The standard advise is to use the higher version compatible.
I do this way, but I think bundler has a defined command for it.
First remove the line of gem 'omniauth'
at your Gemfile. Run bundle install
, then you must add again the line with gem 'omniauth'
to your Gemfile, run bundle install again.
If you look at Gemfile.lock, this install hashie 2.0.5
, the higher compatible.
Edit: why does this work?
First I check omniauth dependencies with hashie: hashie < 4, >= 1.2
, then the same with restforce: hashie < 2.1, >= 1.2.0
. At this point, I know that any version of hashie between 1.2 and 2.0.x must work. Then we must to remove the constraint at Gemfile.lock of continue using hassie 3.3.1, removing 'omniauth' from Gemfile it's done. After that, when install restforce, the bundler find the new version compatible with restforce '2.0.5'. And when you add again omniauth bundler don't update dependencies that are accomplished.