Crash on running Sinatra on Heroku

I have been trying to get Sinatra running on Heroku, although it was working fine on my localhost, but when getting to Heroku. A few things need to pay attention to.

Here a checklist, if you have been getting the some crashes.

  • Do you have and Gemfile set properly?

Because Heroku is used as rack, so you need define how to run it. To run on localhost, the command is 


Just take note that you will be running on port 9292.

Aside that, you also need to have Gemfile set up properly. Here is  the documentation
  • Are you running HAML?

I was getting issue when I started adding in HAML. I later narrowed down that the, I need to modular app, if not by running Sinatra::Application will cause the crash. So how to change it to modular app? You can check out the documentation here,%20Libraries,%20and%20Modular%20Apps. After that you need to change the to run your Sinatra modular app e.g.: run SkeletonApp 

or you can also refer to a template on github for more info.