Getting Heroku to run a new app

I’ve been trying to launch a new app. After following the instructions I started running into weird errors. I am also probably not a typical Heroku user.

I had an old Heroku account supposedly using an older RSA public key; I made a new one. Because I have > 2 keys Heroku kept hanging up on me when I tried pushing the master branch. I did an ssh-add -d <KEYNAME> on my main public key, and ssh-add -l confirmed that was gone. Then git push heroku master succeeded. (I had to do an ssh-add later to add back my normal public key.)  Apparently Heroku doesn’t like > 2 keys before disconnecting.

Then there was the issue of me not using Postgres locally. I got the logs via the heroku logs command, and that revealed the message “Please install the postgresql adapter”. I found a StackOverflow post that explained you needed to add the therubyracer-heroku and the pg gems to your :production environment in the Gemfile. The next git push heroku master showed the pg gem being installed.

Still no luck. Another get of the logs revealed “application.css isn’t precompiled”. Oh, right because of the Asset Pipeline stuff. Another post noted the bundle exec rake assets:precompile command.

Next up, the database needed to be set up. (Database migrations were not automatic.) So, I ran: heroku run rake db:migrate, followed by restarting the server: heroku restart.