Rails finally working with Snow Leopard

So far Snow Leopard have given me nothing but a hard time, crashes, and wasted hours that I could advise anyone not to upgrade, while I keep my ego and refuse to downgrade. After the 1 hour+ Snow Leopard upgrade, I’m getting slower login time, very frequent crashes upon uploading or downloading simplest of files in Firefox, TweetDeck occasionally, and even Safari, so don’t you be blaming someone else in your ads Apple.

The worst however was the expected, and it was Rails, until today. After the upgrade, running my existing sqlite based rails app gave me the error:

uninitialized constant SQLite3::Driver::Native::Driver::API

StackOverflow had the right advise to fix the problem:

sudo gem install sqlite3-ruby

Except it gave me the error

ERROR: Failed to build gem native extension.

Ruby on Rails blog gave the instructions to upgrade MacPorts and then all the ports installed.

$ sudo port selfupdate
$ sudo port sync
$ sudo port upgrade --force installed

The process however gave a “MacPort no suitable image found.”. I followed the advise here and downloaded a fresh MacPort install. You can get one here.

After that I was able to do the port selfupdate and sync, but the port upgrade failed saying:

C compiler cannot create executables

I tried several tricks here, Googled a lot with no luck. I had to leave it for sometime to finish some other work. When I tried today to repeat the three port update steps above, it worked just fine. After that, I just needed to redo the “sudo gem install sqlite3-ruby” and all went fine I’m happy to say.

Special thanks for TWG for their support on the matter. They did point out the problem as a bug in MacPort but I thought otherwise.

Hope that helps someone else out there.

Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

  • http://www.248am.com Mark

    If you are using a pirated copy of Snow make sure its the gold release and not previous seeds.

  • http://blogallalong.com/ Bashar

    Mark: No, I stick to original.

  • http://uptill1.com N

    Ya, I’ve been reading all over the net reports about the bad upgrade. Slow-downs, crashes and compatibility issues. Hard luck

  • http://blogallalong.com/ Bashar

    N: Yeah, very. Guess MSFT will be mocking Apple for new year