So you have developed your shiny new app on your local computer using Ruby on Rails the brand new 3.1 release , you want to deploy it on Heroku, well you might run into unforeseen problems, this blog is to tell you how to avoid that headache.
1. Add Postgre SQL gem in gem-file
You most probably have developed application using Sqlite. When you upload your app to heroku and run the command heroku rake db:migrate , you might find a error that migrations have been aborted. Its because until Rails 3.0 , there is no need to add postgre sql gem into your gem file, now you need to. So open gem file your_app_path/Gemfile and add this:
group :production do gem 'therubyracer-heroku', '0.8.1.pre3' # you will need this too gem 'pg' end
at the end. But on your local machine you must run bundle install as bundle install –without production , that will prevent unnecessary installation of Postgre SQL gem into your PC.
2. Make assets compilable
Thats it, this should make your deployment on heroku pain free. If you still have trouble contact ruby forum.