Skip to content

Instantly share code, notes, and snippets.

@JayK31
Forked from catm705/gist:10171658
Created April 8, 2014 19:50
Show Gist options
  • Save JayK31/10180312 to your computer and use it in GitHub Desktop.
Save JayK31/10180312 to your computer and use it in GitHub Desktop.
HEROKU STEPS to SET UP:
1. git init
2. git add -A
3. git commit -m “”
4. heroku create
5. heroku keys:add → If there are any.
6. 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
Seeding the Database:
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