I’ve never had this issue before, but I recently started using rvm and for whatever reason got the following error when trying to do rake db:migrate
uninitialized constant Rake::DSL
After googling around and trying a bunch of convoluted solutions (many which addressed a broken 0.9.0 build of rake), I found that adding the following line to my Rakefile fixed everything:
EdgeCase has published a great walkthrough of the various Ruby language features. They call it Ruby Koans. The Ruby Koans are a a collection of broken tests. Each broken test is designed to teach you something about the Ruby language. Many are fill-in-the-blank, eg:
obj = Object.new
another_obj = Object.new
assert_equal __, obj.object_id != another_obj.object_id
To pass this koan/test, you’d replace the “__” with true, because new instances of objects have new object_ids.
I wouldn’t recommend this for people new to programming, but if you’re like me and used Ruby a few years ago but have fallen out of practice, it’s a perfect re-introduction. If you’re new to Ruby but have a solid background in other languages, this may be of use as well.