Skip to content

Installing system jruby for ruby processing

Martin Prout edited this page Apr 15, 2016 · 17 revisions

Windows and Mac

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

Linux

For most individual 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 that actually installs latest versions).

ArchLinux

Installation is no longer simple since updated versions are installed instead (try propane alternative for processing-2.2.1)

sudo pacman -Syu # make sure you are up to date
sudo pacman -S jruby # currently installs jruby-9.0.5.0

You need to be aware where your gems will get installed, which is {USER.HOME}/.gem/ruby/2.3.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-3.0.2 (so use JRubyArt)

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.25/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 absolutely 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

Although this may not be necessary depending on your setup (gem install .. may suffice). [tarball]:http://jruby.org/download [JRuby.org]:http://jruby.org/getting-started