Used a Udacity course.
- (heroku account)
- (heroku toolbelt)
heroku login- (git)
- (fork)
- (clone)
cd galeriagit statusheroku creategit remote -vgit push heroku masterheroku open- (I changed my app’s URL/name to "my-galeria" at https://dashboard.heroku.com/)
git remote rm herokuheroku git:remote -a my-galeriaheroku open(should take you to https://my-galeria.herokuapp.com/)
https://devcenter.heroku.com/articles/multiple-environments
local computer:
<command>
remote server:
heroku run <command>
git checkout -b pg origin/pg(to create branch "pg" = PostgreSQL database for Ruby as required by Heroku)- or
git checkout origin/pg
- or
- (postgresql: http://postgresapp.com/ or http://www.postgresql.org/download/windows/ or http://www.postgresql.org/download/linux/ubuntu/)
bundle install(to check the ActiveRecord gem that translates ruby to sql is stable locally)ruby app.rb- (visit localhost:4567 to see a Sinatra error)
- (shut down server)
rake db:migrate(to create database table)ruby app.rb- (localhost:4567)
git branch(check on pg branch)git push heroku HEAD:masterheroku open(should get internal server error)heroku run rake db:migrate(should get error cannot find database connection b/c no postgresql addon included in heroku)heroku addons:create heroku-postgresql(to include the postgresql addon)heroku run heroku run rake db:migrate(to try database migrations again in the heroku server)- (refresh page)