0

I have upgraded my Ruby to 2.5 and after rectifying many dependency issues, I'm stuck at a place. There is save method being called which saves the records, but somehow it do not works now and shows following error:

500 Internal Error
undefined method 'fetch_value' for #<Hash:0*0007e589e>
Did you mean fetch_values
             each_value:

Earlier the same .save was working perfectly fine.

Matey Johnson
  • 223
  • 1
  • 2
  • 12
  • 1
    https://stackoverflow.com/questions/30602250/undefined-method-fetch-value-for-nilnilclass-when-using-roo – chaitanya Jul 12 '19 at 05:56

1 Answers1

0

I've seen the same exception before. In my case, some ActiveRecord models were marshaled via Marshal::dump and saved as binary stream. Then, Ruby and Rails were upgraded.

Afterwards, calling Marshal::load on the marshaled copies would retrieve them and object.class would show the right model's name, but accessing any attribute within would throw the same exception.

I had to clear the marshaled copies and generate new ones.