RSS

Category Archives: Jruby

Install jruby in linux(ubuntu) system

1. download the jruby using the URL

http://jruby.org.s3.amazonaws.com/downloads/1.6.0/jruby-bin-1.6.0.tar.gz

Note: download the latest version of the jruby

2. Open a terminal and go to the directory where you have downloaded file and unpack the jruby file using the following command:

$ tar zxvf jruby-bin-1.3.1.tar.gz

3. We need to set come environment variable. I will add the following line at end of file .bashrc in your home directory. Mention the downloaded verion in jruby-version name

export JRUBY_HOME=/home/home_directory_name/jruby-1.6.0
export PATH=$JRUBY_HOME/bin:$PATH

4.Now, Let’s check whether JRuby is installed properly, type the command:

$ jruby-v

jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154) (OpenJDK Client VM 1.6.0_18) [linux-i386-java]

If you are able to see the JRuby version, your system is configured properly.

Now you can start installing some gems:

$ jruby -S gem install jruby-openssl

jruby-openssl is necessary due JRuby doesn’t support the default Ruby’s openssl.  The parameter -S tells JRuby to use the scripts which are in JRuby’s bin directory, then in a second case to use the which ones in the system PATH.

$jruby -S gem install rails

It will fetch and install the gem related to rails(already installed your system).

 
Leave a comment

Posted by on May 3, 2011 in Installations, Jruby, Ubuntu

 

Tags: , ,