2017-10-09 106 views
0

我正在使用mina将我的应用程序部署到分段和生产服务器。一切都工作得很好,直到上个月,当我跑米娜命令部署我的应用程序,它显示了我的错误DateTime的undefined方法`remove_possible_method':类

mina aborted!
NoMethodError: undefined method remove_possible_method' for DateTime:Class Did you mean? remove_method /home/tiendo/.rvm/gems/ruby-2.4.2/gems/activesupport-5.0.6/lib/active_support/core_ext/date_time/compatibility.rb:6:in '
/home/tiendo/.rvm/gems/ruby-2.4.2/gems/activesupport-5.0.6/lib/active_support/core_ext/date_time/compatibility.rb:3:in <top (required)>'
/home/tiendo/.rvm/gems/ruby-2.4.2/gems/activesupport-5.0.6/lib/active_support/core_ext/date_time.rb:4:in
require'
/home/tiendo/.rvm/gems/ruby-2.4.2/gems/activesupport-5.0.6/lib/active_support/core_ext/date_time.rb:4:in <top (required)>'
/home/tiendo/.rvm/gems/ruby-2.4.2/gems/activesupport-5.0.6/lib/active_support/core_ext.rb:3:in
require'/home/tiendo/.rvm/gems/ruby-2.4.2/gems/activesupport-5.0.6/lib/active_support/core_ext.rb:3:in `block in '

日志错误是相当长的。所以,我只是复制日志的开始。如果你们想看到完整的日志错误。请让我知道,我要编辑它。

我的Rails应用程序的版本是5.0.6。此外,我使用rvm,我试图切换到红宝石2.8.2,2.3.3,但它仍然显示我同样的错误。我一直在寻找解决方案,但仍然不知道是什么原因导致了错误。任何建议,将不胜感激。多谢你们。

回答

1

这Github的问题可能与你所遇到 https://github.com/rails/rails/issues/28918

本质上讲,它意味着你有require "active_support/core_ext/module/remove_method"activesupport/lib/active_support/core_ext/date_time/compatibility.rb

+0

其实我以前见过这个问题。然而,这次我决定要求文件'gems/activerecord-5.0.6/lib/active_support/core_ext/date_time'顶部的'active_support/core_ext/module/remove_method'。此外,如果有人想知道如何跳转到该文件,因为它是Rails源代码,并且RubyMine允许我在需要时立即跳到Rails源代码,所以我使用RubyMine IDE跳转到此文件。我爱RubyMine。 :) –