Heroku Toolbelt: From a New App to Deployment
Now that Heroku has recently deprecated their gem, you’ll need to switch over to the Heroku Toolbelt. To be honest, I’m not too sure what the difference is but I do know that now is the perfect time to outline how you’d get a new app set up and running on Heroku.
The first thing you’ll need to do is install this Heroku Toolbelt thing. It’s not as easy as a gem install heroku
but it’s certainly not impossible. Just head to the website linked here and download and set up the software. Easy enough!
Next we’re going to log into Heroku.
Easy enough, all you need to input is the login information for your Heroku account. The next step is to create our application.
IMPORTANT: Heroku requires Postgres as their database management system. The easiest way to make sure you avoid any conflicts is to simply set up your app from the beginning with Postgres. But first we must use the new gem.
Once you have that beautiful Postgres gem ready to go, it’s just a matter of creating your application and making sure you’re ready from the get go to use Postgres.
That’s too cool. Now you’ll get a giant stream of all the output from Rails, both the creation of the applications and the output from the bundling of the Gemfile. No worries! Now you just cd
into your application and take a look at your database.yml file. You should see something like…
I like to change the username to my local username on OS X. For some reason I get an error if I don’t (if you know why, tweet me @nikhilthomas90).
Now it’s just a simple matter of getting your application ready to go! We’ll start with the basic commands.
Look at that. Now you create a Heroku stack and push to it.
There you are. A simple heroku open
will open your browser and direct you to the application.
I hope this helps! I had a bit of trouble getting the new toolbelt and Postgres to play nicely but I think this should help out.
Thoughts? Concerns? Know a better way to do it? Let me know!