/config/initializers/secret_token.rb not being generated. Why not?

前端 未结 3 1667
太阳男子
太阳男子 2020-12-17 20:06

Currently going through a rails tutorial and I need to make some modifications to /config/initializers/secret_token.rb, however, I can\'t find this file anywher

3条回答
  •  醉梦人生
    2020-12-17 20:18

    The tutorial you're looking at was likely written for an older version of Rails than you're using.

    secret_token.rb existed in Rails 3 and Rails 4.0 apps; it does not exist in Rails 4.1 apps.

    It has been replaced in Rails 4.1 by the secrets.yml file:

    http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml

提交回复
热议问题