Heroku部署错误H10"配置/app/config.ru未找到"

mau*_*lus 3 ruby deployment heroku sinatra

我正在将我的Sinatra应用程序部署到Heroku,当我到达时,heroku logs我看到以下跟踪:

State changed from crashed to starting
configuration /app/config.ru not found
State changed from starting to crashed
 at=error code=H10 desc="App crashed" method=GET path=/ host=... request_id=... status=503 bytes=
...heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=... dyno= connect= service= status=503 bytes=
Starting process with command `bundle exec rackup config.ru -p 31614`
Process exited with status 1
Run Code Online (Sandbox Code Playgroud)

出了什么问题 - 是我的红宝石版本(ruby 1.9.3p484)......我真的不知道它会是什么.在localhost中一切都很好用.

mau*_*lus 6

好的,得到了​​关于bundle exec rackup config.ru -p 31614不在本地工作的指针的答案.错误的是我没有添加config.ru文件.按照https://devcenter.heroku.com/articles/rack上的指南, 我做了简单touch config.ru,然后添加了以下行:

require './server.rb'
run Sinatra::Application
Run Code Online (Sandbox Code Playgroud)

到我的config.ru档案.

然后我得到一条消息,应用程序不知道pry是什么:/app/server.rb:2:in 'require': cannot load such file -- pry (LoadError),所以我require 'pry'从server.rb中删除,推送到github:

git add -A
git commit -m "message"
git push 
Run Code Online (Sandbox Code Playgroud)

最后把它推到了heroku

git push heroku master
Run Code Online (Sandbox Code Playgroud)