tsort.rb中关于static_assets的奇怪弃用警告

时间:2015-08-03 10:08:10

标签: ruby-on-rails deprecation-warning

当我在capistrano部署production时,我收到以下错误消息。但在staging我没有得到警告信息。

DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in tsort_each at /home/deploy/.rbenv/versions/2.2.0/lib/ruby/2.2.0/tsort.rb:226)

此外,我的production.rb和staging.rb环境文件都注释了以下行:     #config.serve_static_files = true

1 个答案:

答案 0 :(得分:0)

最终我意识到很久以前我添加了一个宝石,让应用程序在Heroku上运行。

离开heroku后,该宝石仍留在Gemfile中并导致错误。 我通过删除修复了以下内容:

gem 'rails_12factor'