-
Notifications
You must be signed in to change notification settings - Fork 89
Installing system jruby for ruby processing
For Windows and Mac users you could probably do much worse than following Jruby.org instructions.
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).
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.
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.6/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