Let's Build: With Ruby On Rails - Deploying An App To Heroku

Let's Build: With Ruby On Rails – Deploying An App To Heroku

Hi, My name is Andy Leverenz. I design, code, and am an author of things. Check out my blog Web-Crunch

☕️Help me keep going:

Deploying a Rails app can be a daunting experience. There are a vast number of hosts out there but many fail to compare to Heroku. In this single part screencast, I guide you through the process of deploying an app to Heroku.

### Projekt
This article and video carry over from a previous Let’s Build called :

Let’s Build: With Ruby on Rails – Project Management App

I did a while back called Projekt. You can find that blog post here as well as all the videos.

⚙️ Download the Source Code:

# Key things to remember

## Databases

Rails apps often default to `sqlite` for the database. In terms of scalability and performance, you might want to opt for a different type of database for your production based apps. Luckily getting your app working in a completely new environment is quite easy with enough know how. In this guide, I opt for `postgresql` as recommended by Heroku directly –

Following Heroku’s own written guide – can get you extremely far if you are brand new to the process.

You can run `postgresql` locally using the command line utility or using an app like [Postgres]( (my preferred method). You still need to know some basic `postgresql` commands to get up and running. This typically involves creating new roles and or databases manually. I referenced a [Digital Ocean article]( to help with my own efforts. There are other articles in their tutorial section that can also shed some light on the subject. [Digital Ocean]( is also a fantastic and affordable host but there’s a lot more manual maintenance and setup here. If you’re new I’d suggest at least starting with Heroku. Although a little daunting at first I found it the easiest to get up and running with.

## Git
You have to use git when working with Heroku. The deployment process depends on a git repo to push your final production code to the remote app of your choosing.

## Heroku CLI (Heroku Toolbelt)
This is probably the most comprehensive CLI I’ve used which gives you full control of your Heroku account via the command line. You can create apps, modify apps, deploy, configure, and more. Using the CLI as part of your deployment workflow saves a massive deal of time. Combined with `git` you can deploy to any type of environment as you wish by adding more than one `git remote`.

💻 Previously published at:

💻 Check out the blog:

🦄 Check out my personal site:

🚀 Links:
Weekly Newsletter:
Twitter(Personal Account):

📘Check out my book on UX Design:
“LUXD: Learn User Experience Design”

📙 Check out my FREE book on Tumblr Theming:
“Pro Tumblr Theming”

💯 Need awesome web hosting? Check out cloudways. They allow me to use a variety of hosting providers and build apps with ease:

7 thoughts on “Let's Build: With Ruby On Rails – Deploying An App To Heroku

  1. Hi Andy, I am trying to deploy zammad helpdesk into Heroko but didn't find any documentation on it. Can you help?

  2. Nice tutorial! I have an issue though… I followed all the steps, the database was correctly created with all its tables, but it seems the data from my sqlite database was not imported, so the tables are completely empty. Any ideas of why could that happen? I can't seem to find a solution

  3. I have a problem, when trying and setting up the database I get an error that says "fe_sendauth: no password supplied" and it won't allow me to create the db or anything. I can't even run the localhost:3000 because it says "password not supplied" any thoughts on this?

  4. I've got an issue while trying to deploy.
    ERROR in ./app/javascript/components/VideoModal.js
    remote: Module not found: Error: Can't resolve './Api_keys'

    I'm assuming because the apikeys are in my git ignore Heroku doesn't have access to them? Not sure how to resolve

  5. hello Andy, good job you are doing. I was trying to deploy to heroku following your guide. But I am stucked to same spot you were with thie error : Uglifier::Error: invalid regexp character
    I found a fix of same similar error to Try replacing

    config.assets.js_compressor = :uglifier

    config.assets.js_compressor = Uglifier.new(harmony: true)
    in config/environments/production.rb

    I did that yet, the proplem still persist.
    Could you please explain how you fixed yours.

Leave a Reply

Your email address will not be published. Required fields are marked *