Skip to content

Instantly share code, notes, and snippets.

@dassiorleando
Created March 12, 2017 08:09
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dassiorleando/21a1dcd55eaf623164b6573b171b4945 to your computer and use it in GitHub Desktop.
Save dassiorleando/21a1dcd55eaf623164b6573b171b4945 to your computer and use it in GitHub Desktop.
Simple instructions to deploy a ruby on rails app to heroku

Push Your RoR app To Heroku

Simple Config To Push Your RoR app To Heroku using Pg:

  • Let sqlite just in development & test environment
group :development, :test do
 gem 'sqlite3', '1.3.12'
end
  • Add pg in production env
group :production do
  gem 'pg', '0.18.4'
end
  • Prepare to deploy for production, just to update the Gemfile.lock
bundle install --without production
  • Commit changes
git commit -a -m "Update Gemfile for Heroku deployment"
  • We create our heroku app, beeing in our project root folder
heroku create name_of_the_app
  • We push all online
git push heroku master
  • Migration in remote db
heroku run rake db:migrate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment