Ruby 1.8.7 on MacPorts causing some problems
It appears that MacPorts has upgraded to Ruby 1.8.7, which is good news if you’re running Rails 2.1… but if you have an older Rails application… it’s not going to work too well.
In order to get Ruby 1.8.6 installed with the latest MacPorts, you’ll need to do the following.
$ mkdir /Users/Shared/dports
$ svn checkout -r 36429 \
http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ \
/Users/Shared/dports/lang/ruby/
Then you’ll need to modify your macports to use this new local source. You’ll need to edit /opt/local/etc/macports/sources.conf
and add the following line above the existing rsync record.
file:///Users/Shared/dports and create that directory
Next, you’ll want to index this new local source with the following command:
portindex /Users/Shared/dports
After that, you can do the following.
sudo port uninstall rb-rubygems ruby
sudo port clean rb-rubygems ruby
sudo rm -r /opt/local/lib/ruby/gems/1.8/doc/rubygems-1.1.1/
sudo port deactivate autoconf
sudo port install ruby rb-rubygems
..and hopefully you’ll have Ruby 1.8.6 installed and be able to retain the rubygems you installed already.