我正试图通过遵循这里教程来学习rails。但是,当我到达关于创建模型的部分并运行以下命令时:
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>'这是我的第二次经历,所以我知道我已经遵循了所有的步骤。知道我可能在哪里寻找解决方案或者知道解决方案是什么吗?这真的让我卡住了。
版本:
发布于 2017-05-11 21:16:37
基于本期,您能运行spring stop并尝试再次运行命令吗?
发布于 2018-01-09 21:25:35
重新开始也为我工作,但我需要做的每一次。相反,我在我的the文件中升级到了spring的最新版本(2.0.2)。这个修好了。
https://stackoverflow.com/questions/43925563
复制相似问题