我正在尝试按照教程here学习rails。但是,当我到达the section on creating the model并运行此命令时:
bin/rails generate model Article title:string text:text
我收到了这个错误:
/usr/lib/ruby/vendor_ruby/spring/application.rb:152:in `serve': undefined method `cleanup!' for ActionDispatch::Reloader:Class (NoMethodError)
from /usr/lib/ruby/vendor_ruby/spring/application.rb:131:in `block in run'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in `loop'
from /usr/lib/ruby/vendor_ruby/spring/application.rb:125:in `run'
from /usr/lib/ruby/vendor_ruby/spring/application/boot.rb:18:in `<top (required)>'
from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
这是我的第二次经历,所以我知道我已经完成了所有步骤。我知道在哪里寻找解决方案或知道解决方案是什么? 这真让我陷入困境。
版本:
答案 0 :(得分:0)
重启也为我工作,但我需要每次都这样做。相反,我在我的gemfile中升级到了spring(2.0.2)的最新版本。这解决了它。