Using Ruby 1.9.2, Rails 3.0.9, and rake 0.9.2
This happened to me when doing a heroku rake db:migrate. The solution:
In my Rakefile, add require ‘rake/dsl_definition’ before require ‘rake’
Hat tip to http://stackoverflow.com/questions/6181312/how-to-fix-the-uninitialized-constant-rakedsl-problem-on-heroku and Kale!
Hey, have rails 3.0.9, ruby 1.9.2, and rake 0.9.2. I started getting the rake:dsl error some time ago. I followed as advised and it did not fix. It allowed me to run db:migrate but couldnt run any tests.
I’m up to ruby 2.0.0, rails 3.2.12, and rake 10.0.3. Suggest you try upgrading your gems next.