So ruby seems to be installed in two place: /usr/bin/ and /opt/local/
bin. The former is the ruby that came with my Mac, and the latter
from MacPorts. Should I not use MacPorts to install/update ruby?
So ruby seems to be installed in two place: /usr/bin/ and /opt/local/
bin. The former is the ruby that came with my Mac, and the latter
from MacPorts. Should I not use MacPorts to install/update ruby?
The Ruby that comes with Leopard is perfectly adequate (it’s what I’m
using for development), unless you specifically want a newer version.
Some people like to install through Ports or Fink or build it themselves
regardless, but I think that’s just a waste of time and disk space.
What Marnen said. Also, if you want to test stuff with multiple
versions of Ruby, rvm is an easy way to automatically install and
isolate different versions of Ruby on the same machine.
So ruby seems to be installed in two place: /usr/bin/ and /opt/local/
bin. The former is the ruby that came with my Mac, and the latter
from MacPorts. Should I not use MacPorts to install/update ruby?
Well, there’s nothing fundamentally wrong with having multiple Rubies
on one system. Before RVM [1] came along, I always used to compile my
own Ruby into /usr/local, and it seemed to live perfectly happy
alongside OS X’s built-in Ruby.
So, the fact that MacPorts’ Ruby is misbehaving in this way on your
system is strange. But unless you’re particularly interested in
fathoming that problem out, the quickest fix (as Marnen and Nat have
suggested) would be to uninstall MacPorts’ Ruby and use OS X’s
instead, or use RVM to install your Rubies.
Ouch! I think I’m using patchlevel 287, which would imply that a later
upgrade to Snow Leopard fixed the patch, but I’m not at that computer
right now to check. If I am using the faulty version, that implies
that I finally have a use for RVM.