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