Heroku Rake and Heroku Push Not Working

If i try running: heroku rake db:migrate, this is the error i get:

rake aborted!
undefined local variable or method `config' for main:Object
/app/config/application.rb:4:in `<top (required)>'
/app/Rakefile:4:in `require'
/app/Rakefile:4:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/rake_module.rb:25:in `load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:637:in `raw_load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:94:in `block in load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:93:in `load_rakefile'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:77:in `block in run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/app/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/app/vendor/bundle/ruby/2.0.0/bin/rake:23:in `load'
/app/vendor/bundle/ruby/2.0.0/bin/rake:23:in `<main>

Running: git push heroku master i get this:

Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       could not connect to server: Connection refused
       Is the server running on host "127.0.0.1" and accepting
       TCP/IP connections on port 5432?

I have tried adding: config.assets.initialize_on_precompile = false to application.rb but it did not help :(.

This app i'm trying to push used to be on heroku, but i accidentally deleted my herokuapp. Please help!


问题出在Rolify,新版本有问题,所以我不得不退到3.2.0。

链接地址: http://www.djcxy.com/p/80002.html

上一篇: Rail升级后资产预编译失败

下一篇: Heroku Rake和Heroku推不工作