Skip to content

Installing system jruby for ruby processing

Martin Prout edited this page Aug 17, 2013 · 17 revisions

Windows and Mac

For Windows and Mac users you could probably do much worse than following Jruby.org instructions.

Linux

For most linux users RVM will be a pain, and further the distro supplied version of ruby-processing will be hopelessly out of date (with the exception of ArchLinux).

ArchLinux

Installation is a simple as

sudo pacman -Syu # make sure you are up to date
sudo pacman -S jruby # currently installs jruby-1.7.4, you can ignore issue with ffi that has been fixed since

You need to be aware where your gems will get installed, which is {USER.HOME}/.gem/ruby/2.0.0. So it is best to set GEM_HOME environment in your .bashrc, and add ${GEM_HOME}/bin to your path as well (now your gem installed executables should run).

Ubuntu and other debian flavours

Download and unzip tarball into /opt (well that is where, by convention, such packages live), then create a symbolic link to jruby executable using update-alternatives as follows:-

sudo update-alternatives --install /usr/bin/jruby ruby /opt/jruby-1.7.4/bin/jruby 100

On ubuntu/kubuntu at least, you usually need sudo to install gems, and they get installed in /var/lib/gems/1.9.1 so you might like to set your GEM_HOME and PATH environmental variables appropriately. To be sure, it probably best to install ruby-processing and any other gems you might like to use ( with ruby-processing ) using:-

sudo jruby -S gem install my_gem.gem
Clone this wiki locally