Any blog or tutorial for installation of JRuby 1.6.7 and Rails 3 on Ubuntu?
Asked
Active
Viewed 3,217 times
2 Answers
6
First install rvm:
$ bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
$ source ~/.bash_profile
Once rvm is installed, use it to install jruby:
$ rvm install jruby-1.6.7
You can then use that version:
$ rvm use jruby-1.6.7
Finally, install rails:
$ jruby -S gem install rails
Update
With more recent versions of rvm, installing the latest version of jruby and rails is very straightforward:
$ \curl -L https://get.rvm.io | bash -s stable --autolibs=3 --ruby=jruby --gems=rails

Sébastien Le Callonnec
- 26,254
- 8
- 67
- 80
-
With "rvm install jruby-1.7.3", I'm getting "/usr/local/rvm/scripts/db: line 61: awk: command not found" on Ubuntu Server 12.04.2 with openjdk-7. But, it appears that jruby was installed, and I can use jirb. – Greg M. Krsak Mar 20 '13 at 20:01
-
One more thing.. the RVM installer mentions that you should use "source /etc/profile.d/rvm.sh" – Greg M. Krsak Mar 22 '13 at 15:36
-
@gotqn rvm used to define its variables in `.bash_profile`, so sourcing it was needed to load them. – Sébastien Le Callonnec Mar 26 '13 at 20:01
-
@SébastienLeCallonnec Thanks. Should this be done every time? – gotqn Mar 26 '13 at 20:07
-
@gotqn No, only the first time rvm was installed — but I believe this is not needed any longer with recent versions of rvm. – Sébastien Le Callonnec Mar 26 '13 at 20:20
-
It should be noted that if you use this method and you already have a ruby version installed on your system, your default ruby version will be switched out for whatever one is packaged with JRuby. If you want to switch back to the one you have in the system (because you don't want to switch over to RVM just yet because you're lazy), you can remedy the situation by running the command `sudo update-alternatives --config ruby`. – Seanny123 Aug 06 '13 at 07:13