到目前为止,就我的git / heroku体验而言,一切都很完美。
最近我试图推送一个新的提交,并得到以下“无法识别的错误”:
-bash> git push heroku master
Counting objects: 29, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (18/18), 1.78 KiB, done.
Total 18 (delta 14), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
All dependencies are satisfied
-----> Compiled slug size is 14.5MB
-----> Launching...
! Heroku push rejected due to an unrecognized error.
! We've been notified, see http://support.heroku.com if the problem persists.
To git@heroku.com:thing-thing-1234.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:thing-thing-1234.git'
答案 0 :(得分:1)
糟糕!问题解决了。我做git status
后不久,发现我实际上没有添加文件。所以上面是尝试推送空提交。这就是我所做的:
-bash> RAILS_ENV=production bundle exec rake assets:precompile
-bash> git commit -m "vendor compiled assets"
-bash> git push heroku master
但我应该这样做:
-bash> RAILS_ENV=production bundle exec rake assets:precompile
-bash> git add .
-bash> git commit -m "vendor compiled assets"
-bash> git push heroku master