I am using ruby 2.5 and rails 5.0.1 for my application. when i try to run console or generate controller or migration it gives me this error:
Running via Spring preloader in process 6473
Loading development environment (Rails 5.0.1)
Traceback (most recent call last):
/home/abwahed/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/spring-2.0.1/lib/spring/application.rb:161:in
fork': undefined method reject!' for nil:NilClass (NoMethodError)
There was an active discussion about this issue few days back here in spring gems repo. The underlying ruby gem binding_of_caller
was creating the issue with ruby 2.5.0. The issue is marked as closed with a pr now here in binding_of_caller_repo. So, I think you can simply do a bundle update
or bundle update binding_of_caller
to fix it. You can also try downgrading ruby to 2.4.3
if that doesn't worked. Hope this helps.