RSS

Install jruby in linux(ubuntu) system

03 May

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: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: