usunyu   Stay hungry. Stay foolish.

Create Rails Project

Getting Started with Rails 4.x on Heroku:

$ rails new test_project -d mysql
$ bundle install
$ rails server
$ rails s
$ heroku login
// add to gem 'rails_12factor', group: :production Gemfile
$ bundle install
// add to  ruby “2.0.0” Gemfile
// in App folder
$ git init
$ git add .
$ git commit -m "init"
$ heroku create
$ git config -e

Managing Your SSH Keys:

$ ssh-keygen -t rsa
$ heroku keys:add
$ heroku run rake db:migrate
$ heroku ps:scale web=1
$ heroku ps
$ heroku open
$ heroku logs
$ heroku logs —tail
$ heroku addons:add cleared

ClearDB MySQL Database:

$ heroku config | grep CLEARDB_DATABASE_URL
$ heroku config:set DATABASE_URL='CLEARDB_DATABASE_URL'