Category Archives: Ruby On Rails

Git missing in OSX Mountain Lion

Quick one today to remind others and perhaps my future self. After my upgrade to Mountain Lion, git was missing. Surprise!

Easy fix for me, obtained via https://answers.atlassian.com/questions/72981/error-after-upgrading-to-mountain-lion-os-git-svn …  (Thanks!)

In Xcode, we just go to Preferences > Downloads and click install next to “Command Line
Tools”:

Re-installing command line tools, git included!

Hope this helps! It certainly easier to git push when you actually have git ;)

Heroku ‘uninitialized constant Rake::DSL’

I ran into this problem while learning how to work with Heroku. (Heroku had some pretty big news for themselves this week, announcing Yukihiro Matsumoto had joined them as “Chief Architect, Ruby”).

The problems happens after you’ve pushed your app up, when you’re trying to run your rake db:migrate.

So I found the solution in one of the posts over here: at stackoverflow, … so if this doesn’t work for you, try one of the other answers (shrug).

Basically, I had to use an older version of rake. So in my Gemfile, I added:

# Hack to workaround Heroku 'uninitialized constant Rake::DSL'
#
gem "rake", "0.8.7"

Then a few commands to get ourselves up to date:

$ bundle update rake
$ git commit -a -m "Use 0.8.7 of rake"

And then of course re-run our db:migrate:

$ heroku rake db:migrate