每个人,
运行此命令时出错:“git push heroku master”。错误日志显示以下内容:
$ git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.156' to the list of known hosts.
Counting objects: 3, done.
Writing objects: 100% (3/3), 209 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
! Heroku push rejected, no Rails or Rack app detected
To git@heroku.com:simple-earth-536.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@app_name.git'
知道是什么原因引起的吗?我欢迎任何建议,谢谢大家。
答案 0 :(得分:2)
这意味着您不在rails应用程序中,例如,如果您不在正确的目录中。
确保您确实在应用目录中。
rails myapp
cd myapp
这是您应该经历的流程“
rails new_app
git init
git add .
git commit -m 'master'
heroku create
git push heroku
答案 1 :(得分:2)
关注Heroku的这篇文章