Jruby on Ubuntu 10.04
Installation of Jruby on ubuntu
1. First of all get the installer for the Jruby from the jruby site http://jruby.org/download. As we wanted to use the latest version 1.6.2 so we downloaded that version and as we want to do this installation on Ubuntu so we downloaded .tar.gz file (JRuby 1.6.2 Binary .tar.gz (md5, sha1)
2. After downloading we need to install it by copying it to a location where it is easily accessible.We have extracted file (jruby-1.6.2) kept it at HOME directory
3. Now to make it available, we need to add the path to the environment variable, for that we need to open the .bashrc file.
4. To open the .bashrc file you can use the command on the terminal as ($ gedit ~/.bashrc)
5. It will open the file in editor then add the below mentioned code as per your directory path.You have to add two line of code which will define the path of the jruby and other will add that to Environment variable $PATH
export JRUBY_HOME=/home/jruby-1.6.2
export PATH=$JRUBY_HOME/bin:$PATH
6. Once it is done then try the command on terminal to ensure that Jruby is installed
$Jruby -v
If any issues then try using RVM
1. We have faced a lot of issues to run the application on the Ubuntu and finally, we need to install the RVM to make it work, so here are the steps which we have followed.
2. First of all install the git and curl so that we can use the commands to install the rvm
COMMANDS —
sudo apt-get update # this will do the housekeeping work for you
sudo apt-get install build-essential git-core curl # this will install the curl & sgit
3. Now to get the rvm installed run command
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
Or
use system wide installer
# bash < <( curl -L http://bit.ly/rvm-install-system-wide )
Once this command is completed then open the .bashrc file to make some changes related to RVM
export rvm_path=/usr/local/rvm
[[ -s "$rvm_path/scripts/rvm" ]] && source “$rvm_path/scripts/rvm”