Ruby Heroku部署错误H10“;未找到configuration/app/config.ru“;
我正在将我的Sinatra应用程序部署到Heroku,当我访问Heroku日志时,我看到以下跟踪:Ruby Heroku部署错误H10“;未找到configuration/app/config.ru“;,ruby,heroku,deployment,sinatra,Ruby,Heroku,Deployment,Sinatra,我正在将我的Sinatra应用程序部署到Heroku,当我访问Heroku日志时,我看到以下跟踪: 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=... sta
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
出什么问题了-是我的ruby版本(
Ruby1.9.3p484
)…我真的不知道它可能是什么。在localhost中一切都很好。好的,用关于bundle exec rackup config.ru-p 31614
不在本地工作的指针得到了答案。问题是我没有添加config.ru
文件。按照iSimple上的指南,我触摸了config.ru,然后添加了以下行:
require './server.rb'
run Sinatra::Application
到我的config.ru
文件
然后我收到一条消息,应用程序不知道pry是什么:/app/server.rb:2:in'require':无法加载这样的文件--pry(LoadError)
,因此我从server.rb中删除了require'pry'
,并将其推送到github:
git add -A
git commit -m "message"
git push
最后把它推给了heroku
git push heroku master
命令
bundle exec rackup config.ru-p 31614
在本地工作吗?@hjingbundle exec rackup config.ru-p 31614
在本地不工作。相反,我得到消息configuration/home/../config.ru not found