Skip to content

blog ||= "Lake Hills Media"

It's hard out there being a developer

Now, that I’m starting to move all my personal files from a PC to my new Mac, I learned that I need a way to replace a Microsoft Access database I use all the time.  It’s a simple application.  It just keeps track of what I’m spending on utilities and the usage readings.  I have some reports that will show how the cost and usage varies over the years.

Since, I’m super cheap, I decided not to purchase File Maker Pro, which is a great replacement.  I’m going to write my own application in Cocoa.

I found a decent tutorial for learning Cocoa.   http://cocoadevcentral.com/d/learn_cocoa/

The tutorial was easy to follow, but when it came time to compile and run, it failed with the following error message

error: can’t exec ‘/Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings’ (No such file or directory)

I found an interesting article that help me fix the problem. Fix

If you run the copystrings command in Terminal, you will find that it’s looking for ruby in /usr/bin/ruby.  However, since MacPorts was installed, Ruby is in another location /opt/local/bin/ruby.

To fix the problem, run the following code

sudo ln -s /opt/local/bin/ruby /usr/bin/ruby

They mention that this is not an ideal fix, but worked for me, and since I’m new to Mac OS programming, I’ll take what I can get.

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!!!

I’m pleased to announce that http://www.lakehillsmedia.com is up and running.  The Lake Hills Media blog site is also up and running at http://blog.lakehillsmedia.com.  This blog will have a few different purposes.  First is documenting the process from a very experience Microsoft Developer to learning and creating sites based on Ruby on Rails.  Additional blog posts will be based on MSFT technologies, including ASP.NET, C# and SharePoint / MOSS.  I might even throw in some cooking posts.