Lil*_*ilz 19 ruby-on-rails heroku
我正在尝试将rails应用程序推送到heroku.
当我到达最后一步时:
git push heroku master
Run Code Online (Sandbox Code Playgroud)
它不起作用,并给我这些错误:
Counting objects: 85, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (74/74), done.
Writing objects: 100% (85/85), 24.38 KiB, done.
Total 85 (delta 23), reused 0 (delta 0)
-----> Heroku receiving push
! Heroku push rejected, no Rails or Rack app detected.
error: hooks/pre-receive exited with error code 1
To git@heroku.com:smooth-dusk-26.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:smooth-dusk-26.git'
Run Code Online (Sandbox Code Playgroud)
我不知道我做错了什么:(
小智 8
这是我从Heroku得到的答案,它对我有用(在尝试了不同的pg宝石,适配器以及其他10篇关于此的其他帖子之后)
1)将行:gem'pg'添加到您的Gemfile中.
2)运行命令bundle install将gem安装到您的包中.
3)暂存Gemfile和Gemfile.lock更改:git add Gemfile Gemfile.lock
4)提交更改:git commit -m"安装pg gem"
5)重新部署到heroku:git push heroku master
在创建Rails应用程序时,是否将目录更改为应用程序的目录?您必须从应用程序的目录中执行所有命令.
rails myapp
cd myapp
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
12402 次 |
| 最近记录: |