Read my latest article: 8 things I look for in a Ruby on Rails app (posted Thu, 06 Jul 2017 16:59:00 GMT)

Ruby 1.8.7 on MacPorts causing some problems

Posted by Fri, 20 Jun 2008 20:11:00 GMT

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.

Get help with your Rails project

comments powered by Disqus