Deploy a Rails App with Heroku

·

·

It’s easy as pie to push a demo version of your rails app to heroku. Follow the simple steps below and you’ll be on your way to testing in a subdomain of herokuapp.com.

You can also point your dns to heroku and have a live app with a few commands!

  1. Make sure that you have a heroku account and have downloaded the heroku toolbelt
  2. Login to Heroku
  3. heroku login
    
  4. Add Heroku To Your App
  5. heroku keys:add
    heroku create
    
  6. Add gem for asset precompiling
  7. # For heroku,
    gem 'rails_12factor',  group: :production
    
  8. Install Gems and Push to Github
  9. Push from Github to Heroku
  10. git push heroku master
    heroku open
    
    # Optional
    heroku rename "your-app-name"
    
  11. Migrate Your Database
  12. heroku run rake db:migrate
    
  13. To Debug
  14. heroku logs --tail
    
    # For a set number (500 for example)
    heroku logs --num 500
    
  15. For a uniquie domain
  16. heroku domains:add "name-of-full-url.com"
    heroku domains:add "www.name-of-full-url.com"
    


Leave a Reply

Your email address will not be published. Required fields are marked *