App made, now it’s time to deploy. It’s easy once both git and heroku as well as a new app (via `heroku create`) are setup on the system. CD to the app directory and do in order:
git add .
git commit -m "message goes here"
git push heroku master
Then it’s time to prepare the database so I run:
heroku run rake db:migrate
This actually gives me a strange error:
bad URI(is not URI?):
However, running `heroku logs` reveals:
/Users/grinch/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:644:in `initialize': getaddrinfo: nodename nor servname provided, or not known (SocketError)
Well, that’s pretty obvious, I haven’t added the Redistogo add-on in this application’s deployment. Let’s do that quick with:
heroku addons:add redistogo:nano
Done! Let’s test it up by firing up `heroku run console` and popping in:
It responds with “ok” - we’re in business. When trying to migrate the database again, it works great. I try accessing the app’s URL and it’s live!
- Show more notes