デプロイ(heroku)
Herokuにデプロイする手順
heroku create アプリケーション名
% git config --list | grep heroku
fatal: not in a git directory
以外が表示であればおk
% heroku addons:add cleardb
% heroku_cleardb=`heroku config:get CLEARDB_DATABASE_URL`
% heroku config:set DATABASE_URL=mysql2${heroku_cleardb:5}
% heroku config:set RAILS_MASTER_KEY=`cat config/master.key`
% heroku stack:set heroku-18 -a アプリケーション名
% git push heroku master
% heroku run rails db:migrate
その他
% heroku config
% heroku apps:info
% heroku logs --tail --app アプリケーション名
環境変数を置かずにgit push heroku masterした場合
環境変数を記述する
続いて
% git commit --allow-empty -m "空のcommit"
% git push heroku master