1
當我在production
中使用capistrano
進行部署時,出現以下錯誤。但在staging
我沒有收到警告信息。tsort.rb關於static_assets的奇怪棄用警告
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 =真
請出示完整回溯和你的Gemfile的相關部分。 – EugZol
這只是一個警告貶值,那麼,搜索項目文件夾中的'serve_static_assets'我相信你會發現'serve_static_assets'用'serve_static_files'替換它,並愉快地部署。嗯,這只是爲了您的頭腦安寧:) !!! –
問題是,我找不到任何地方引用serve_static_assets! production.rb和staging.rb配置文件非常相似,都沒有設置... – pastullo