algolia / algoliasearch-rails

AlgoliaSearch integration to your favorite ORM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatibility with the new 'algolia' gem

guillaumewrobel opened this issue · comments

Description

As algoliasearch-rails requires:

  • algoliasearch (>= 1.26.0, < 2.0.0)
  • json (>= 1.5.1)

if you include the new Algolia search gem, you end with a conflict between two analytics.rb files:

algolia-2.0.0/lib/algolia/config/analytics_config.rb:2:in `<module:Algolia>': Analytics is not a module (TypeError)
algoliasearch-1.27.5/lib/algolia/analytics.rb:3: previous definition of Analytics was here

Steps To Reproduce

add to your gemfile:

gem 'algoliasearch-rails'
gem 'algolia'

launch rails console

Hi @guillaumewrobel ! Indeed we're aware of that, and a new major version of the algoliasearch-rails gem including the v2 of the algolia gem will be out in the next 3 months! We thank you for your patience in the meantime

Ok, maybe you could write a warning phrase about this incompatibilty in both gems readme 💡

Hi @chloelbn it's been 3 months since your message. Do you have news about this new algoliasearch-rails major version? :)

Just wanted to add my vote to this. In the hope those in charge can devote some additional resources to the development of this gem.

commented

@chloelbn does closing the issue means that it is resolved ? still happens on our side

Hi @benbonnet ! Do you mean you're using both algoliasearch gem and algolia ?

commented

Hello;

gem 'algoliasearch-rails'
gem 'algoliasearch'

We'd like to migrate to algoliasearch-rails, plan to drop algoliasearch. Transitioning but for now we would have to stick with both. Stuck with the same error (...analytics_config.rb:2:in < etc...)

Hi @chloelbn is there a commit or release that closed this? If so, can you please link to it?

@chloelbn I think this issue should be reopened as several teams are encountering this issue...

Hi @duhaime !

version 2.x of this gem adds support for the algolia gem. If you can upgrade to that version, you should no longer have to rely on the algoliasearch gem. If your project relies on that on top of the algoliasearch-rails gem, I'd recommend staying on version 1.x, or upgrading the algoliasearch gem to the algolia one. Hope that helps! 🙂