How to fix uninitialized constant Rake::DSL error

in Rakefile, add the following line:

require 'rake/dsl_definition'

right before

require 'rake'

Published on July 11, 2011 (over 6 years ago)

Article tags: rails, rake, ruby

Comments (2)

Somer over 6 years ago

Paul you saved my time, thank you.

Piyush Gupta over 6 years ago

better use 0.8.7 version of rake , no need to do the above .

gemlock file
--------------------
rake (0.8.7)

PLATFORMS
x86-mingw32

DEPENDENCIES
mysql
rails (= 3.0.10)
rake (= 0.8.7)

gem file
------------
gem 'rake', '0.8.7'

Will work for sure .