Rails配置密钥库返回nil
运行rails控制台时,我在开发环境中对Rails.configuration.secret_key_base
调用将保持返回nil。
#secrets.yml development: secret_key_base: the-long-secret-generated-by-rake-secret #...other configs, a call while running heroku rails c in production also returns nil
怎么会这样? 运行导轨4.1.0
如文档中所述 :
添加到此文件的机密可通过
Rails.application.secrets
访问。
从控制台运行Rails.application.secrets.secret_key_base
应该返回: Rails.application.secrets.secret_key_base
the-long-secret-generated-by-rake-secret
- 从“mysite.herokuapp.com”重定向到“www.mysite.com”
- 使用Capistrano在Heroku上部署?
- 缺少必需的参数:ras测试中的aws_access_key_id,aws_secret_access_key
- 错误解析Gemfile; 无法部署到Heroku
- heroku上的Google Vision API身份validation
- Hartl的导轨教程在当地完成了作品。 Heroku坚持“我们很抱歉,但出了点问题。”
- 在Heroku上一起使用Resque,Puma和Scheduler
- Heroku App Crash H10 – bash:bin / rails:没有这样的文件或目录
- ExecJS :: RuntimeError:SyntaxError:意外的标记:operator(>)(行:22342,col:24,pos:826182)