Pushing a Rails 4.0.0.rc2 app to Heroku 6/15/13
I’m working on a new side project in Rails 4.0.0.rc2 that I wanted to host on Heroku. The current Heroku documentation for Rails 3 got me most of the way to a working app, but I ran into two problems:
- Rails 4 requires Ruby 1.9.3 or newer. My app failed to work on Heroku’s Cedar stack until I added this line to my
Gemfile
:
After changing your Gemfile
be sure to run bundle install
again.
- My CSS and Javascript assets would not load even though Heroku wasn’t throwing any errors. I fixed this problem by changing
config.assets.compile
totrue
in my production.rb file:
Update: You can read Heroku’s unreleased Rails 4 documentation here. Thanks to Trevoke on Reddit for the tip.