A major new feature in JRuby 1.6 is the implementation of theRuby 1.9.2 language. However by default JRuby is configured to work on Ruby 1.8.7 mode. Here is how you can use the Ruby 1.9.2 mode in your BitNami JRubyStack installation.
On Linux and Mac OS X open a terminal and go to the installation directory.
On Windows use the entry in the Start Menu: BitNami JRubyStack —> Use BitNami JRubySTack
Once you are in the console execute:
The output you receive will include:
jruby 1.6.0 (ruby 1.8.7 patchlevel 330).
If you want to use Ruby 1.9.2 mode just for this session, but use the 1.8.7 mode as the default, just need to add the JRUBY_OPTS environment variable for this session.
On Linux and Mac OS X execute:
jruby -v will show:
jruby 1.6.0 (ruby 1.9.2 patchlevel 136)
However, once you close the terminal this configuration will be lost.
If you want to set Ruby 1.9.2 mode as the default mode (so you don’t need to configure it every time) edit the environment settings for you BitNami JRubyStack by doing the following.
On Linux and Mac OS X edit the
setenv.sh file that you can find in the scripts directory of your installation by adding the line:
On Windows edit the
setenv.bat file in the scripts directory of your installation by adding the line:
Now if you open the BitNami JRubyStack console (as explained above) and execute
jruby -v you will see that you are working with the Ruby 1.9.2 mode.