4

I'm having the same heroku rake issues described (and from what I can tell solved) in this question.

When I try the fix (include require 'rake/dsl_definition' above require 'rake') I get the same

'uninitialized constant Rake::DSL'

error from heroku + I get the error

'no such file to load -- rake/dsl_definition'

from my local rake.

Without incorporating the fix (using the standard rakefile) I can use rake on my local setup with no errors (with the same heroku error)

I'm using rake version 0.8.7 (though I get the same results using 0.9.2) and Rails 3.0.9. I've gone through the suggestions in the previous question but from what I can tell the problem isn't with my Gemfile. Has anyone else had this problem? Has anyone else solved their heroku rake problem using a different solution? Or can anyone explain/suggest how I'm going about this incorrectly?

Thank you for your help.

Community
  • 1
  • 1
Mat Newman
  • 183
  • 2
  • 6
  • could you please add the output of "heroku stack" command ? – Luca G. Soave Jun 20 '11 at 12:39
  • My problem ended up righting itself on its own (still not sure why), and if it comes up again I'll add the output but from the comments it sounds like your solution is the fix. Thank you @Luca for your help! – Mat Newman Jun 21 '11 at 13:40

2 Answers2

5

Try adding require 'rake/dsl_definition' on top of Rakefile.

Adrian Toman
  • 11,316
  • 5
  • 48
  • 62
Luca G. Soave
  • 12,271
  • 12
  • 58
  • 109
4

Not enough for me. I was getting the no such file to load -- rake/dsl_definition error even adding the require 'rake/dsl_definition' line in the "Rakefile" file

I had all gems version OK and only 0.8.7 rake version but I had to create a "Gemfile" in the redmine root path with the next content:

gem "rake", "0.8.7"

And delete the require 'rake/dsl_definition' line added previously in Rakefile

Hope be usefull for someone

ProtheanTom
  • 514
  • 6
  • 7