uninitialized constant Rake::DSL

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!

2 comments to uninitialized constant Rake::DSL

  • Andrew

    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.

  • Thomas

    I’m up to ruby 2.0.0, rails 3.2.12, and rake 10.0.3. Suggest you try upgrading your gems next.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>