I'm deploying my Sinatra application to Heroku and when I got to heroku logs
I'm seeing the following trace:
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
What's wrong - is it my ruby version (ruby 1.9.3p484
)...I really don't know what it could be. Everything works great in localhost.
Ok, got the answer with the pointer about bundle exec rackup config.ru -p 31614
not working locally. What was wrong was that I had not added a config.ru
file. Following the guide at https://devcenter.heroku.com/articles/rack I simple did touch config.ru
, then added the lines:
require './server.rb'
run Sinatra::Application
to my config.ru
file.
Then I got a message that the application did not know what pry was: /app/server.rb:2:in 'require': cannot load such file -- pry (LoadError)
, so I removed require 'pry'
from server.rb, pushed to github:
git add -A
git commit -m "message"
git push
and finally pushed it to heroku
git push heroku master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With