Reputation: 710
I am trying to learn rails by following the tutorial here. However when I got to the section on creating the model and ran this command:
bin/rails generate model Article title:string text:text
I got this error:
/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>'
This is my second go through so I know I have followed all the steps. Any idea where I might look for the solution or know what the solution is? This really has me stuck.
Versions:
Upvotes: 2
Views: 1223
Reputation: 16373
Restarting worked for me too, but I needed to do it every-time. Instead, I upgraded to to the latest version of spring (2.0.2) in my gemfile. This fixed it.
Upvotes: 3
Reputation: 529
Based on this issue, can you run spring stop
and try to run your command again?
Upvotes: 6