Bobbonius
Bobbonius

Reputation: 21

Upgrading from Rails 5.0.7.2 to 5.1.7 causes an error with limited explanation

I'm trying to upgrade my Rails project. I'm coming from 4.0.13 and am now at 5.0.7.2, which is stable. Next step would be to go from 5.0.7 to 5.1.7 but this raises an error.

The error first occurred when I tried to run my project locally and sign in. Running it works but as soon as I wanted to sign in (using devise by the way) an error is raised. At first I thought this error was caused by devise but then I tried accessing other models via my console and they gave the same error.

NoMethodError at /
undefined method `any?' for nil:NilClass

This is the error in my web console when I try to sign in. But it's similar to the one terminal console.

irb(main):002:0> Report.last
Traceback (most recent call last):
        1: from (irb):2
NoMethodError (undefined method `any?' for nil:NilClass)

This is all I got in terms of errors. Was wondering if anybody has had something similar before and if there are any solutions.

Thanks in advance!

Upvotes: 0

Views: 215

Answers (1)

Bobbonius
Bobbonius

Reputation: 21

Oke so a lot of rubber ducking against my colleague got us to an answer, at least for our specific situation.

We had a gem installed called 'ignorable'. In Rails 5 they added something allows you to ignore columns without that gem. Apparantly, something in this ignorable gem was causing this behavior as we removed it from the Gemfile and the errors were gone.

Upvotes: 2

Related Questions