我克隆了一个名为Publify的Ruby项目(一个开源博客平台。)然而,当我运行rails服务器时,我收到以下错误(我已经复制粘贴图像下面的信息)>
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <class:Simple> at /home/ubuntu/workspace/publify-master/lib/i18n_interpolation_deprecation.rb:24)
=> Booting Thin
=> Rails 5.0.3 application starting in development on http://0.0.0.0:8080
=> Run `rails server -h` for more startup options
Exiting
/usr/local/rvm/gems/ruby-2.2.2/gems/actionpack-5.0.3/lib/action_controller/railtie.rb:60:in `block (3 levels) in <class:Railtie>': Invalid option key: page_cache_directory= (RuntimeError)
然后是一大堆&#34;来自:&#34;陈述(如图所示。)
如果你想看一下,我的公开回购就在这里:https://gitlab.com/AvBloom98/publify。我做了一些工作来更新宝石等,因为它们之前失败了,因此它与原始的Publify Github不一对一(在这里找到:https://github.com/publify/publify)
答案 0 :(得分:1)
Publify gem正在其configuration中设置页面缓存目录,但页面缓存已被弃用且removed from Rails 4 。
但是,您可以通过在项目中添加 actionpack-page_caching gem 来恢复页面缓存支持,如Rails guides中所述。从this issue开始,我认为gem也可以很好地运行在Rails 5中。