Hey guys, I override all backend apps with view c...
# general
s
Hey guys, I override all backend apps with view controller and model. I want to install the searchkick_solidus gem in that app. I installed both gems:
Copy code
gem 'searchkick'
gem 'solidus_searchkick'
when I run this command "*bundle exec rails g solidus_searchkick:install*" I got this error.
Copy code
in `method_missing': undefined method `parent_name' for PRojectNAME::Application:Class (NoMethodError)
o
Try to move second gem above of the first. Cuz solidus have some of dependencies of gems order. It can help.
👍 1
s
@Oleksandr Pozniak thanks for your response to me. I try to do it already. still the same issue.
a
IIRC the problem is that
solidus_searchkick
is not compatible with rails 6.1 because
parent_name
has been (re)moved. Try this, I think it should be the simplest fix:
Copy code
# app/models/spree/product_decorator.rb
module Spree
  module ProductDecorator
    def self.prepended(base)
      base.searchkick index_name: "YOUR_APP_NAME_#{Rails.env}", word_start: [:name]
    end
    Spree::Product.prepend self
  end
end
s
@Andre Schweighofer Thank you for your help i will try. Now I used only searchkick gem .