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:
Then it’s time to prepare the database so I run:
git add .
git commit -m "message goes here"
git push heroku master
This actually gives me a strange error:
heroku run rake db:migrate
However, running `heroku logs` reveals:
rake aborted! bad URI(is not URI?):
Well, that’s pretty obvious, I haven’t added the Redistogo add-on in this application’s deployment. Let’s do that quick with:
/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)
Done! Let’s test it up by firing up `heroku run console` and popping in:
heroku addons:add redistogo:nano
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!