Search code examples
ruby-on-railsrubysearchkicksolidus

solidus_searchkick - undefined method `deep_symbolize_keys'


I am using Solidus and I want to implement a better search wiht elasticsearch, I'm using solidus_searchkick to do that. But I get the following error:

undefined method 'deep_symbolize_keys' for #<ActionController::Parameters:0x0000556eae99cda8>

At Spree::HomeController#index, that has:

Spree::HomeController.class_eval do
    def index
        @searcher = build_searcher(params.merge(include_images: true))
        @products = @searcher.retrieve_products
        @taxonomies = Spree::Taxonomy.includes(root: :children)
    end
end

I have NOT changed anything at Solidus' search options.

I get this error right after I run 'bundle install', installs everything just fine. Then, I run 'rails s' and I get this error when I try to get my home or any other page that shows me any product.


Versions:

  • Rails: 5.1.6
  • Ruby: 2.5.1
  • solidus_searchkick: 0.3.4
  • Solidus: 2.5.0

Solution

  • This is an issue with the deprecated method deep_symbolize_keys in Rails 5.1. I just submitted a Pull Request for the solidus_searchkick gem. You can find it here https://github.com/elevatorup/solidus_searchkick/pull/6/files

    If you point your solidus_searchkick gem to that branch it will work.