Skip to content

Installing system jruby for ruby processing

Martin Prout edited this page Dec 22, 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 probably be a pain, and further the distro supplied version of jruby 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.6

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). Whilst you are at you might as well install vanilla linux.

sudo pacman -S processing # currently processing-2.0.3

This will be useful if for nothing other than making it easy to install regular processing libaries, and exploring their examples.

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.9/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