Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku Deployment error H10 "configuration /app/config.ru not found"

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.

like image 208
maudulus Avatar asked Mar 19 '23 13:03

maudulus


1 Answers

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.rufile.

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
like image 195
maudulus Avatar answered Apr 26 '23 10:04

maudulus