The Birth of This Super Awesome Website: Depolying Rails App to Heroku + Custom Domain Names

This is a Ruby on Rails website hosted by Heroku.

The look and feel is inspired by the Octopress.

I decided to make it on rails because I like to have more control over the tools I use.

For those of you not familiar with the deploying process of rails apps, and for anyone who would like to have a short note to look at anytime you don’t want to rely on your precious memory too much, here is the super short list:

  1. If your app is not on Github yet, make a new repository on Github, and follow the directions give by github

2.Now assume your app has a Github repository.

Go to your Gemfile, and replace ‘gem sqlite3’ with this:
` group :development,:test do   gem ‘sqlite3’ end

group :development do  gem ‘pg’ end `
This is because Heroku’s production environment does not support SQLite3 database but PostgresSQL. If your application use databases other than PostgreSQL, change accordingly.

  1. Now run bundle install again to apply the changes for your gem file. Don’t forget to push -u origin master again to update your git repository to reflect the changes.

  2. Now assume you have heroku installed,


heroku create --stack cedar

You should see something like,
Creating random-name-2720… done, stack is cedar

  1. Now, time to push to heroku! run: git push heroku master
    you can see your process status withheroku ps

  2. Finally,migrate your database remotely: heroku rake db:migrate

  3. Now what if you have a custom domain that you want to use,
    do heroku domains:add

and go to your domain registrar, add your heroku app’s url as the CNAME with www.

If you want more information on custom domains for heroku, check these out:

OOP and Access Control Tutorial I :Private vs Public (and Why) »