Manual install

Pure jruby installation on raspbian no need for rbenv or rvm or existing ruby.

Get the latest version from

cd /opt
sudo tar xzvf /pathToDownload/jruby-bin-

Then use the excellent update-alternatives tool to provide symbolic links to jruby, jgem, jirb and rake especially if you haven’t installed mri ruby.

sudo update-alternatives --install /usr/bin/jruby jruby /opt/jruby{version}/bin/jruby 100
sudo update-alternatives --config jruby


You should prefer to install gems locally (no need for sudo). To do that it is convenient on linux to edit your ~/.profile (or equivalent eg ~./bashrc) file as follows, the important thing is ensure that the gem bin directory is on your path.

alias jpry="jruby -e \"require 'pry'; binding.pry\""
# export JAVA_HOME="/opt/jdk1.8.0_151" # if using oracle java openjdk-8 is fine though
export GEM_HOME="$HOME/.gem/ruby/2.5.0"
export GEM_PATH="$HOME/tux/.gem/ruby/2.5.0"
export PATH="${PATH}:${GEM_PATH}/bin"

Automated install using bash

The script currently installs jruby- and picrate-2.0.pre.

If you know better please post on wiki