我收到錯誤類似於那些inthesequestions,除了礦山都存在的對Heroku:如何解決Heroku上未初始化的常量Rake :: DSL問題?
2011-05-30T09:03:29+00:00 heroku[worker.1]: Starting process with command: `rake jobs:work`
2011-05-30T09:03:30+00:00 app[worker.1]: (in /app)
2011-05-30T09:03:30+00:00 heroku[worker.1]: State changed from starting to up
2011-05-30T09:03:33+00:00 app[worker.1]: rake aborted!
2011-05-30T09:03:33+00:00 app[worker.1]: uninitialized constant Rake::DSL
2011-05-30T09:03:33+00:00 app[worker.1]: /app/.bundle/gems/ruby/1.9.1/gems/rake-0.9.0/lib/rake/tasklib.rb:8:in `<class:TaskLib>'
答案在這些問題似乎是指定gem 'rake', '0.8.7'
因爲0.9版本導致問題。
當我嘗試添加gem 'rake', '0.8.7'
我的Gemfile並推到Heroku的我得到這個錯誤:
Unresolved dependencies detected; Installing...
You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
You have added to the Gemfile:
* rake (= 0.8.7)
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
error: hooks/pre-receive exited with error code 1
To [email protected]:my_app.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:my_app.git'
我的Gemfile正常工作正常在Heroku。我該怎麼辦?
您是否嘗試過發佈了[#3答案](http://stackoverflow.com/questions/5287121/undefined-method-task-using-rake-0-9-0/5290331#5290331)?做出這些改變後發生了什麼? – Zabba 2011-05-31 00:31:09