So there’s no way to have a single version of nokogiri that can
simultaneously satisfy both version contraints.
Other than forking aws-sdk, seeing if it is compatible with nokogiri
1.5 and if it is changing the version in the dependency
Hi Fred,
Can the OP not put the following in his gem file:
gem ‘nokogiri’, ‘~> 1.4.4’, ‘1.5.0’
Would this not make both gem versions available to gems that require
different versions of nokogiri?
I had two gems recently that required different versions of capybara,
and a similar approach worked for me. If it’s wrong, then I need to
find out why it solved my issue, because my understanding of my
problem is therefore wrong.
I had two gems recently that required different versions of capybara,
and a similar approach worked for me. If it’s wrong, then I need to
find out why it solved my issue, because my understanding of my
problem is therefore wrong.
Hard to say without knowing exactly what your circumstances were, but
at a basic level only one version of any given gem can be loaded at
any single time
I was having a problem getting cucumber to play nice with a current
rails 3.0.9 project, (after running bundle update cucumber began
failing everything, presumably due to now-conflicting gem versions),
so I set up a few different gemsets in rvm and dummy projects for
rails 3.0.5 thru’ 3.0.9, and began adding gems to the gem files one by
one to try and find out where I had gone wrong, and to try and
understand what was going on with dependency versions etc.
I seem to remember one gem required capybara 0.4.0 and another
required >= 0.4.1 for the 3.0.5 project.
Adding both versions for capybara as:
gem ‘capybara’, ‘>= 0.4.1’, ‘~> 0.4.0’
fixed the problem, AFAIK.
I now have cucumber and rspec running fine in all three rails
versions, only problem I have left relates to devise based scenarios
which are failing when simulating clicking the sign in link, although
manual clicking on the site is fine.
If I get the chance this weekend, I’ll try digging deeper into the gem
versions and dependencies, just thought it might have been a solution
for the OP.
Would this not make both gem versions available to gems that require
I seem to remember one gem required capybara 0.4.0 and another
required >= 0.4.1 for the 3.0.5 project.
Adding both versions for capybara as:
gem ‘capybara’, ‘>= 0.4.1’, ‘~> 0.4.0’
fixed the problem, AFAIK.
That line works because you are saying “I want a capybara gem that is
greater than or equal to 0.4.1, AND which is greater than or equal to
0.4.0 and less than 0.5.”
When you combine those conditions, you end up with “greater than or
equal to 0.4.1, and less than 0.5.” Which is fine because versions
0.4.2, 0.4.3, 0.4.4 etc. will all satisfy that condition.
On the other hand, this line:
gem ‘nokogiri’, ‘~> 1.4.4’, ‘1.5.0’
is saying “I want a nokogiri that is greater than or equal to 1.4.4
and less than 1.5, AND which is equal to 1.5.0.” No version can
possibly be less than 1.5 AND be equal to 1.5 at the same time, so
it’s an invalid specification, since you can only have one version
active at a time.
and a similar approach worked for me. If it’s wrong, then I need to
find out why it solved my issue, because my understanding of my
problem is therefore wrong.
Hard to say without knowing exactly what your circumstances were, but
at a basic level only one version of any given gem can be loaded at
any single time
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.