Installing JRuby on Ubuntu

Today we will see how to install JRuby on Ubuntu

First of all you need to download the JRuby. Download the latest JRuby accessing the link:

http://dist.codehaus.org/jruby/

I am using the version 1.3.1 (jruby-bin-1.3.1.tar.gz)

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

We need to set some environment variables. I will add the following line at end of file .bashrc in your home directory.

export JRUBY_HOME=/home/leonardo/jruby-1.3.1
export PATH=$JRUBY_HOME/bin:$PATH

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

$ jruby -v

You should see something like this:

jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java HotSpot(TM) Client VM 1.6.0_13) [i386-java]

Alright! 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.

If you want to install Rails:

$ jruby -S gem install rails

That’s all about!

1 comment so far

  1. green smoke coupon code on

    Hey there, I think your website might be having browser compatibility issues.
    When I look at your blog site in Ie, it looks fine but when
    opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that,
    great blog!


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: