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!
- Make sure that you have a heroku account and have downloaded the heroku toolbelt
- Login to Heroku
heroku login
- Add Heroku To Your App
heroku keys:add heroku create
- Add gem for asset precompiling
# For heroku, gem 'rails_12factor', group: :production
- Install Gems and Push to Github
- Push from Github to Heroku
git push heroku master heroku open # Optional heroku rename "your-app-name"
- Migrate Your Database
heroku run rake db:migrate
- To Debug
heroku logs --tail # For a set number (500 for example) heroku logs --num 500
- For a uniquie domain
heroku domains:add "name-of-full-url.com" heroku domains:add "www.name-of-full-url.com"