spring/application.rb:161 undefined method `reject!' for nil:NilClass (NoMethodError)
Asked Answered
M

1

15

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:infork': undefined method reject!' for nil:NilClass (NoMethodError)

Mesial answered 1/2, 2018 at 19:12 Comment(0)
S
37

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.

Statutory answered 1/2, 2018 at 20:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.