LoginSignup
7
6

More than 5 years have passed since last update.

【Rails4.1】secret.ymlのproductionのkeyを生成する方法

Posted at

他のサイトでは移行方法はよく書かれてるんだけど、4.1で新規作成した場合のsecret.ymlのproduction-keyの作成方法が書かれてることが少なかったので。。

移行じゃないとsecret_token.rbなんてないー!!と思ってたら
ちゃんと方法がありました。

RAILS_ENV=production rake secret

これで各環境のkeyが表示されるので、コピペしてsecret.ymlに書いて再起動すればOKでした。

7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6