Deploying to Heroku


Deploying Ruby on Rails applications can be scary. Especially when you are a beginner and you want to focus on programming and not on managing virtual servers and setting up deployment process. Fortunately you can use Heroku which makes deploying and managing applications trivial.


Create and deploy an application:

$ heroku apps:create [optional_application_name]
$ git push heroku master
$ heroku run rake db:migrate

Populate database with sample data (optional):

$ heroku run rake db:seed

And that's really it. Especially if you use Rails 5. With previous version of Rails there were other changes needed, like installing rails_12factor gem, getting rid of WEBrick and other small tweaks. But that isn't the case with Rails 5.

Also, I forgot to mention it in the video, but you should set your ruby version. You can do it in Gemfile:

source ""
ruby "2.3.1"
# ...