Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

heroku rake require 'rake/dsl_definition' fix not working + breaking local rake

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.

like image 511
Mat Newman Avatar asked Jan 19 '23 10:01

Mat Newman


2 Answers

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

like image 78
Luca G. Soave Avatar answered Jan 30 '23 01:01

Luca G. Soave


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

like image 24
ProtheanTom Avatar answered Jan 29 '23 23:01

ProtheanTom