0

Install Ruby on Rails for Mac Snow Leopard using MacPorts

Posted by admin on Sep 26, 2009 in Ruby

Not sure why but I had a heck of a time running my ruby on rails code after updating my Mac to Snow Leopard. I use MacPorts to do my development so I simply removed it and all of my ports as well as the gem I had installed in my home folder.  I went through a complete uninstall/reinstall several times before I found the combinations that worked for me.  These are the last steps I did where it worked…

sudo rm -rf /opt
sudo rm -rf .gem

I downloaded and installed the latest MacPorts (1.8).

I then executed the following commands:

sudo port selfupdate
 sudo port sync
 sudo port install ruby
 sudo port install git-core +svn
 sudo port install rb-rubygems
 sudo gem update --system
 sudo env ARCHFLAGS="-arch x86_64" gem install sqlite3-ruby -- --with-sqlite3-dir=/opt/local
 sudo gem install rails cucumber

I got a lot of “No definition for” warnings on the RDoc for sqlite3-ruby-1.2.5 but it doesn’t seem to matter.

Thanks to Ken Collins for his great blog entry that goes into much more detail.

Copyright © 2010 programming with passion All rights reserved. Theme by Laptop Geek.