Roger S. [email protected] wrote on 06/02/2011 07:37:38 AM:
Hi, JRuby newbie here.
What is the most efficacious way to upgrade from JRuby 1.6.1 to 1.6.2?
(I don’t believe I need to retain both.)
Most people swear by tools like RVM and pik. If you’re developing on
Linux or a Mac, then use RVM. Otherwise, use pik on Windows.
These tools make it very easy to install and use multiple version of
Ruby and Jruby for development purposes. Also, I believe both tools
make it easy to use the same gems with multiple versions of Ruby. You’ll
need to check the docs for each tool to see how they help you manage
Should I uninstall 1.6.1? Should I install 1.6.2 over 1.6.1 by
choosing the previously established directory (in my case: c:
Just install both. Here’s all of the rubies that I’m managing with pik
on my XP box:
PS F:\scripts> pik list
131: jruby 1.3.1 (ruby 1.8.6p287) (2009-06-15 2fd6c3d) (Java
140: jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3)
150: jruby 1.5.0 (ruby 1.8.7 patchlevel 249) (2010-05-12 6769999)
* 160: jruby 1.6.0 (ruby 1.8.7 patchlevel 330) (2011-03-15 f3b6154)
186: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
187: ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mingw32]
I don’t see any instructions on the JRuby site indicating how to
upgrade without also re-installing gems one by one, and the default
behavior of the installer creates a new directory for JRuby.
If you don’t use some sort of helper app for this sort of thing, then
yes, you’ll have to install them all one-by-one. However, tools like
bundler can also help with this task.
Also: I’ve been leaning on David Black’s “The Well-Grounded Rubyist,”
which restricts itself to Ruby 1.9. Without realizing it, all the
exploring I’ve done so far in JRuby has been with the 1.8.7 arm, and I
infer from general commentary that its pool of gems is larger than
that for JRuby’s 1.9.2 arm. Is that so? If not (or if not
significantly), are there strong reasons to prefer 1.9.2 or 1.8.7 for
starting out with JRuby?
This is a pretty big question. Yes, there are more gems for the 1.8.x
branch of Ruby, and also more “general support”. However, this will
change soon enough.
If there’s nothing keeping you on the 1.8.x branch, then I recommend
using the 1.9.x branch. This will make your code more “future-proof”.
Also, if you want to run anything on top of CRuby, then it will probably