Skip to content

Instantly share code, notes, and snippets.

@ghostropic
Forked from catm705/gist:10171658
Last active August 29, 2015 13:58
Show Gist options
  • Save ghostropic/10180629 to your computer and use it in GitHub Desktop.
Save ghostropic/10180629 to your computer and use it in GitHub Desktop.

HEROKU STEPS to SET UP:

git init
git add -A
git commit -m “”
heroku create
heroku keys:add  → If there are any.
git push heroku master

Put in gemfile:

  • rails 12factor gem
  • declare a ruby version → ruby -v then put ruby “2.1.0” in gemfile

gem 'rails_12factor', group: :production ruby "2.1.0"

bundle install
git add .
git commit -m “added to gemfile”
git push heroku master

append .erb to files that need assets - ONLY style.css.erb

rake assets:precompile RAILS_ENV=production

--> rake assets:clean (Reverse of precompile - it deletes things.)

git commit -m “precompiling in production”

Adding to the Database:

heroku run rake db:migrate
heroku run rake db:seed

DEBUGGING:

heroku logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment