I have old rails application. And this application need the same gem with different versions.
For example, it use now
gem ‘actionmailer’ 2.3.5 and ‘actionmailer’ 2.3.2
gem ‘actionpack’, ‘2.3.5’ and ‘actionpack’, ‘2.3.2’
Dont ask me why =) This is old app and very massive. Current rails version 2.3.5
Now i try to use bundler for my gems control. But Bundler can`t allows use one gem twice in config. Or i can see error like this:
Bundler could not find compatible versions for gem “actionpack”: In
Gemfile:
datanoise-actionwebservice (= 2.3.2) ruby depends on
actionpack (= 2.3.2) rubyrails (= 2.3.5) ruby depends on actionpack (2.3.5)
So, can i solve this problem or not and i can`t use Bundler?
datanoise-actionwebservice seems to be very (probably too) restrictive about actionpack and activerecord versions in it’s gemspec. However I see that internally it tries to load these gems with ‘>= 2.3.0’ versions (see lib/action_web_service.rb).
I’d suggest trying forking this gem and patching it’s gemspec, so the version requirements for actionpack and activerecord are changed to ‘>= 2.3.2’.
Then update your project’s Gemfile to use the patched version:
Hopefully it will work with 2.3.5 as well.