Ruby cannot load such file - active_support/core_ext/object/blank

I face the 'sunspot_rails-2.1.0' issue while upgrade the ruby version ruby 2.2 to ruby 2.5 for rails 4.2 and here I would like to share with you which has worked for me.

"LoadError: no such file to load -- active_support/core_ext/object/to_json"

Refrence: https://github.com/sunspot/sunspot/pull/555/files


Had the same problem. I had to run brew update-reset to fix it.


Running brew style fixed this issue for me.


Update

As mentioned in the comments, for some people the solution is:

brew update-reset