So, I bought myself a new iMac for Christmas with the sole purpose of creating a new business around RoR.  This business was going to center around 2 things.  Consulting services and a few new products.  Little did I know, that only after my 1st weekend of getting RoR & Postgres installed, I would be questioning my approach.

Let me explain.  I’m a Microsoft guy…been developing .NET for years and very comfortable with it.  Additionally, I can pretty much figure anything out with the oddities that pop up.  Sadly, that is not the case for Unix type operating systems.  I was having the hardest time getting Postgres to work with Rake.  I kept getting the infamous ” install the gem ‘activerecord-postgres-adapter’”.

I finally found an article by Robby Russell http://www.robbyonrails.com/articles/2008/01/22/installing-ruby-on-rails-and-postgresql-on-os-x-third-edition which was a perfect walk-through.

Some of the key components are:

  • Install XCode 3.0
  • Install MacPorts
  • Hide Leopards Ruby, Gems and Rails (These can be unhidden if needed…just rename /xxx/ruby.orig back to /xxx/ruby, etc…
  • Install Ruby, Gems and Rails via MacPorts
  • Install PostgreSQL

Everything worked fine, except now, the preferred gem is ruby-pg instead of postgres.

Also, I installed all the latest versions…rails 2.2.2, ruby 1.8.7, MacPorts 1.7

Now, I’m happy and my first RoR product is up and running, albeit a same 1 table application!

Thanks Robby!!!