No index.html, no cry

June 29, 2013

Following along with Rails tutorial by Michael Hartl, I built a sample app with a simple database, linking users to microposts in a twitter-like manner. Everything worked well locally, but when it came time to deploy on heroku, I ran across some interesting stumbling blocks:

Rails 4 does not come with a default index.html

There I was, gleefully watching the slug compile on heroku (after several abortive attempts I realized I had not moved the sqlite3 gem into the development environment — heroku doesn’t like that). All seemed fine, I typed

$ heroku open

and what greeted me? A 404 error page! Something has gone horribly wrong! I have been rejected by heroku! I try again from the beginning, ensuring I have followed all the steps.. what could I have missed? Same result. But, Mr. Hartl, said it was easy… what was I missing?

After some digging, I found a heroku tutorial on getting started with the shiny new Rails 4. Deep inside this article, I found the magic words:

“Note: that Rails 4 no longer has a static index page in production, if you’re using a new app, there may be no root page.”

Orly? Are you saying that the 404 error I was getting was actually generated by my properly deployed app? YES! I made some obvious change to the html

<title>You made it!</title>

and redeployed. TADA!

Awesome.


Katie Leonard

Mostly Katie explaining things to herself.

© 2025