资产管道预告警告tsort.rb:226 [英] Asset pipeline DEPRECATION WARNING tsort.rb:226

查看:105
本文介绍了资产管道预告警告tsort.rb:226的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有Rails 4.2可以很好地进行开发,但是在生产环境中,我有以下警告:

I have rails 4.2 working fine on development but in production env I have the following warning:

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/xxx/.rbenv/versions/2.2.1/lib/ruby/2.2.0/tsort.rb:226)

但是我的应用程序配置中没有config.serve_static_assets.它可能在某处配置.

however I don't have config.serve_static_assets in my app config. It might be configured somewhere.

请帮助如何摆脱这种情况.预先感谢.

please help how to get rid of this. thanks in advance.

推荐答案

您收到的弃用警告很可能是由另一个为您设置该配置的gem引起的.对于我来说,我们正在使用 rails_serve_static_assets ,并且正在使用版本0.0.2.要删除弃用警告,只需更新gem(问题已在版本0.0.3中修复)

The deprecation warning you're getting is most probably caused by another gem that's setting that configuration for you. For me, we're using rails_serve_static_assets and we're using version 0.0.2. To remove the deprecation warning, just update the gem (issue has been fixed in version 0.0.3)

bundle update rails_serve_static_assets

这篇关于资产管道预告警告tsort.rb:226的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆