$ gem i bundler --no-rdoc --no-ri
$ rbenv rehash
$ mkdir ror
$ cd ror
$ bundle init
# Gemfileのrailsのコメントアウト外す
$ bundle install --path vendor/bundle
$ bundle exec rails new rails_study -d mysql
$ cd rails_study
$ bundle install --path vendor/bundle
$ bundle exec rails s
# アプリのスキーマが作成されてないのでエラーが出る
$ bundle exec rake db:create
$ bundle exec rails s
$ open http://0.0.0.0:3000/
$ echo '/vendor/bundle' >> .gitignore
$ git init
$ git add .
$ git commit
$ bundle exec rails g scaffold user name:string
$ bundle exec rake db:migrate
$ bundle exec rails s
$ git add .
$ git commit
$ bundle exec rails s -e production
$ open http://0.0.0.0:3000/
エラーになる
$ bundle exec rake db:create RAILS_ENV=production
$ vim config/routes.rb
# root 'users#index'
$ vim config/environments/production.rb
# config.assets.compile = true
$ bundle exec rake assets:precompile
$ bundle exec rails s -e production
$ open http://0.0.0.0:3000/
$ git add .
$ git commit
$ brew install heroku
$ heroku login
$ heroku keys:add ~/.ssh/id_rsa.pub
Host heroku
User git
HostName heroku.com
IdentityFile ~/.ssh/id_rsa
Port 22
$ heroku create
$ heroku addons:add cleardb:ignite --app [app name]
$ heroku config --app [app name] | grep CLEARDB_DATABASE_URL
$ heroku config:set DATABASE_URL='mysql2://[URL]' --app [app name]
$ git push heroku master
$ heroku run rake db:migrate
$ heroku open