railstutorial.jp 1章メモ

  • テーマ
$ bundle install --without production
$ heroku login
$ heroku create
Creating xxxxxx-xxx-0000... done, stack is cedar
http://xxxxxx-xxx-0000.herokuapp.com/ | git@heroku.com:xxxxxx-xxx-0000.git
Git remote heroku added
$ git remote -v
github  git@github.com:violetyk/first_app.git (fetch)
github  git@github.com:violetyk/first_app.git (push)
heroku  git@heroku.com:xxxxxx-xxx-0000.git (fetch)
heroku  git@heroku.com:xxxxxx-xxx-0000.git (push)
$ git push heroku master
$ heroku open
Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml`
$ rake secret

これを貼り付けるのではなく、herokuの環境に設定する。 https://devcenter.heroku.com/changelog-items/426

$ heroku config:set SECRET_KEY_BASE=`rake secret`

確認

$ heroku config
$ heroku restart
$ heroku run rake db:migrate

config/secret.ymlが.gitignoreに入ってたからっぽい