`muti_json` gem version conflicts

86 Views Asked by At

we are using clever-ruby gem which is already installed in my project. Now I am working on one feature where I need to store the values in server-side cookies when I stored that value in cookies at that time CookieOverflow error is occured.

So I changed the session store to active_record_store. While installing this gem there is one gem dependence i.e multi_json which require version >= 1.11.2, ~> 1.11.

Now clever-ruby gem required a version of the multi_json is 1.1 and active_record_store gem require >= 1.11.2, ~> 1.11.

Error:

Bundler could not find compatible versions for gem "multi_json":
In Gemfile:
activerecord-session_store was resolved to 1.1.3, which depends on
  multi_json (~> 1.11, >= 1.11.2)

clever-ruby was resolved to 0.13.0, which depends on
  multi_json (~> 1.10.0)

Because of this issue, I am not able to set up the activerecord-session_store gem.

Is there any way to manage the two different version of multi_json gem? Help will be appreciated.

1

There are 1 best solutions below

2
Zia Ul Rehman Mughal On

You just have to update clever-ruby gem to version so it also can work with newer multi_json gem. Make sure to look out for any breaking changes.

If this is not possible because of breaking changes(which seems unlikely after a quick look in its changelog) than you will have to downgrade activerecord-session_store gem so the version of multi_json required by it gets matched with that of clever-ruby v0.13.0.

First option should work, if version for clever ruby is locked in gemfile remove that and run bundle update clever-ruby