OK you don't want anything too complicated so why not just unzip the tar file in your home directory (or possibly in /opt). So now you have folder jruby-1.7.4 with a sub folder bin. So now all you need to add that bin to your PATH in your .bashrc, then source .bashrc to update. Now when you type 'which jruby' it should point to the ~/jruby-1.7.4/bin/jruby
Actually in practice it is probably more convenient to create a symbolic link to say /usr/local/bin/jruby. I found rvm to be a real pig and probably over complicated, but that or brew may be way to go on the Mac? Actually I'm warming the idea of creating my own jruby script, in which I can set the java version and export JAVA_HOME and JRUBY_HOME also could set 'global' jruby args such as invoke-dynamic, see below (it is unfortunate the way -J--XX command gets split over two lines here).
#!/usr/bin/env bash export RUBYOPT=rubygems export JAVA_HOME=/opt/jdk1.7.0_40 export JRUBY_HOME=/opt/jruby-1.7.4 ${JRUBY_HOME}/bin/jruby -J-XX:CompileCommand=dontinline,org.jruby.runtime.invokedynamic.InvokeDynamicSupport::invocationFallback $@
For installing gems using jgem or jruby -S gem you migh want to take a look at this .bashrc file I use on Archlinux (for ubuntu gems are /var/lib/gems/etc)
https://gist.github.com/monkstone/7614877
No comments:
Post a Comment