Sunday, June 14, 2009

git installation on Mac OSX (to fix undefined method acts_as_mappable)

I recently started playing around with geokit within rails. I kept getting an "undefined method `acts_as_mappable'" error. It turns out that the script/plugin command for the installation of the geokit-rails plugin was silently failing. When I entered the script/plugin install command, the command would run and not output anything to the screen. I ended up with an empty vendor/plugins directory.

The root cause ended up being:

I didn't have git installed and on my path. So, I installed it first using this:
http://code.google.com/p/git-osx-installer/

And added /usr/local/git/bin to my path.

(Then later I installed git via ports.)

When I returned to the rails app and re-entered:
script/plugin install git://github.com/andre/geokit-rails.git

All worked properly.

No comments: