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

落爺英雄遲暮 提交于 2019-12-07 07:08:49

问题


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.


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/6400605/heroku-rake-require-rake-dsl-definition-fix-not-working-breaking-local-rake

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!