Contents |
This article is a tutorial that explains how to start developing mobile applications using Ruby for Symbian OS, the port of the Ruby programming language to Symbian.
Because Ruby for Symbian OS is still in an early stage its functionality is quite restricted, and it has a few issues, as documented here.
The Ruby binaries can be found on the Ruby page of the open source projects section of the Symbian developer network, here. The ruby_s60.zip package contains the necessary files for setting up Ruby on your S60 3rd Edition or later device. They are:
Install pips_s60_1_2_SS.sis, if needed, and Ruby_S60_3.sisx and RubyFrontend_S60_3.sisx on your phone. You should see the Ruby icon in the phone's applications folder, as shown in the following image:
The options available in the Ruby Frontend are:
There is only an unofficial release available for 2nd Edition devices. The Ruby binaries can be found here. Download the ruby-symbian-pr2-exe.zip package and in it you will find the following files:
Install Ruby.sis on your phone. You should see the Ruby icon in the phone's applications folder, as shown in the following image:
Ruby scripts are simple text files saved with the RB extension. A common text editor such as Notepad can be used to create such files.
Here are the steps to create a classic "Hello, world!" application:
1. In a text editor, write the following code:
puts "Hello, world!"
2. Save the file as hello_world.rb, for example.
3. Transfer it to your phone.
4. a) On S60 3rd Edition and later: in the Ruby Frontend, select Options -> Open Script..., navigate to your Ruby script (hello_world.rb) and select Select.
b) On S60 2nd Edition: name the script default.rb and, using a 3rd party file browser like FExplorer if necessary, place it in C:\System\Apps\Ruby, replacing the existing default.rb.
The message is displayed, as illustrated in the following screenshots:
Ruby for Symbian OS has the same characteristics as standard Ruby. The following material may be helpful for learning more:
No related wiki articles found