During my capistrano deployment, I run into this error
Bundler could not find compatible versions for gem "nokogiri":
In snapshot (Gemfile.lock):
nokogiri (= 1.6.8.rc3)
In Gemfile:
nokogiri (>= 1.6.8.rc3) x64-mingw32
nokogiri (>= 1.6.8.rc3)
rails-dom-testing x64-mingw32 was resolved to 1.0.7, which depends on
nokogiri (~> 1.6.0) x64-mingw32
rails-dom-testing x64-mingw32 was resolved to 1.0.7, which depends on
nokogiri (~> 1.6.0)
I don't understand, shouldn't ~> 1.6.0 accept my locked version 1.6.8.rc3 ? I am running the Rails app locally perfectly after calling bundle (and I'm on Windows, lol), but the deployment fails on a Ubuntu machine.
Is it caused by the nokogiri (1.6.8.rc3-x64-mingw32) in the GEM>specs of my Gemfile.lock ? I updated this guy so I could use Ruby 2.3 on Windows, but I have to sacrifice Linux for that ?
In your Gemfile.lock, just remove any lines and tree branches with mingw32. For example, if your gemfile.lock contains the lines:
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
nokogiri (1.6.6.2-x86-mingw32)
mini_portile (~> 0.6.0)
Remove the mingw32 section and it should become like this:
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
Then the Gemfile.lock generated on Windows should work for Ubuntu.
You may want always to commit the Gemfile.lock with no occurrences of mingw32.
Alternatively just remove the Gemfile.lock and execute bundle install directly on the Ubuntu machine.
Related
I am trying to install ruby gems and having the following issue. Please suggest. I am a novice in Ruby n Rails. Right now I am using Ruby 2.0.0.
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
nokogiri (~> 1.5)
fog (~> 1.23.0) was resolved to 1.23.0, which depends on
nokogiri (~> 1.5, >= 1.5.11)
Bundler could not find compatible versions for gem "ruby":
In Gemfile:
ruby (~> 2.0.0.0)
nokogiri (~> 1.5) was resolved to 1.8.5, which depends on
ruby (>= 2.1.0)
Bundler could not find compatible versions for gem "sprockets":
In Gemfile:
activeadmin-wysihtml5 was resolved to 1.0.0, which depends on
activeadmin-dragonfly was resolved to 0.0.2, which depends on
activeadmin was resolved to 2.0.0.alpha, which depends on
sprockets (>= 3.0, < 4.1)
sass-rails (~> 4.0.3) was resolved to 4.0.3, which depends on
sprockets (~> 2.8, <= 2.11.0)
As the most easy solution I'd propose to remove versions from Gemfile i.e. instead of writing
gem 'nokogiri', '~> 1.5'
use just
gem 'nokogiri'
The same for all conflicting gems. And then try to rerun you bundle install. This would make Bundler more broad possibilities to find suitable versions. After all dependencies are installed correctly, just fix gem versions according to Gemfile.lock
I'm trying to upgrade Nokogiri to version 1.7:
gem 'nokogiri', '~> 1.7'
but when I run:
bundle update --source nokogiri
I get:
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.............
Bundler could not find compatible versions for gem "nokogiri":
This is in my Gemfile:
nokogiri (~> 1.7)
activemerchant (~> 1.58.0) was resolved to 1.58.0, which depends on
nokogiri (~> 1.4)
activemerchant (~> 1.58.0) was resolved to 1.58.0, which depends on
nokogiri (~> 1.4)
capybara was resolved to 2.7.0, which depends on
nokogiri (>= 1.3.3)
cucumber-rails was resolved to 1.4.3, which depends on
nokogiri (~> 1.5)
haml-rails was resolved to 0.9.0, which depends on
html2haml (>= 1.0.1) was resolved to 2.0.0, which depends on
nokogiri (~> 1.6.0)
haml-rails was resolved to 0.9.0, which depends on
html2haml (>= 1.0.1) was resolved to 2.0.0, which depends on
nokogiri (~> 1.6.0)
rails (>= 4.2.6, ~> 4.2) was resolved to 4.2.6, which depends on
actionmailer (= 4.2.6) was resolved to 4.2.6, which depends on
actionview (= 4.2.6) was resolved to 4.2.6, which depends on
rails-html-sanitizer (>= 1.0.2, ~> 1.0) was resolved to 1.0.3, which depends on
loofah (~> 2.0) was resolved to 2.0.3, which depends on
nokogiri (>= 1.5.9)
roo (~> 2.4.0) was resolved to 2.4.0, which depends on
nokogiri (~> 1)
roo-xls was resolved to 1.0.0, which depends on
nokogiri
capybara was resolved to 2.7.0, which depends on
xpath (~> 2.0) was resolved to 2.0.0, which depends on
nokogiri (~> 1.3)
Does anyone have an idea why it can't find it? I see on rubygems.org that the current version is 1.7.1 as well as on github. Do I need to specify the github source?
The problem is here:
haml-rails was resolved to 0.9.0, which depends on
html2haml (>= 1.0.1) was resolved to 2.0.0, which depends on
nokogiri (~> 1.6.0)
As you can see, html2haml depends on nokogiri (~> 1.6.0), that is not 1.7. You either need to update html2haml (so it dependency becomes nokogiri (~> 1.6)) or use nokogiri, ~> 1.6.
You could try deleting your Gemfile.lock file and running bundle install again, but i will only recommend doing it if you are not yet in production.
I think other gems are depedent on Nokogiri, so
try bundle update.
bundle update will resolve a dependency tree and try and install versions that satisfy all the other gems dependencies.
I'm trying to bundle update nokogiri with gem 'nokogiri', '~> 1.7', '>= 1.7.1'
and Bundler gave me an error
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
nokogiri (>= 1.7.1, ~> 1.7)
anemone was resolved to 0.7.2, which depends on
nokogiri (>= 1.3.0)
haml-rails was resolved to 0.9.0, which depends on
html2haml (>= 1.0.1) was resolved to 2.0.0, which depends on
nokogiri (~> 1.6.0)
quickbooks-ruby (~> 0.4.2) was resolved to 0.4.6, which depends on
nokogiri
haml-rails 0.9.0 is the latest version.. and I expected html2haml to resolve to 2.1.0 as well but it did not...
Could someone tell me what I'm missing here?
try requiring html2haml, '~> 2.1' in your gemfile. Seems like the requirements aren't smart enough to force it to upgrade from the cached version you have installed locally.
I'm trying to install Redmine backlogs on Windows 7.
Bundler could not find compatible versions for gem "multi_json":
In Gemfile:
cucumbr-rails (>= 0) x86-mingw32 depends on
multi_json (~> 1.7.5) x86-mingw32
rails (= 3.2.13) x860mingw32 depends on
multi_json (1.3.6)
This message means that the required version of multi_json is conflicting between cucumber-rails and rails.
How can I solve this?
try running this command at root of your application.
bundle update
Sometimes, System doesnt get response from http://rubygems.org/
so it will shows error. First of all delete the Gemfile.lock file. Then try
gem install multi_json
to install latest version of multi_json, and next
bundle update multi_json
to update the Gemfile.lock. I hope this will resolve your issue.
I try to install Husdon 1.0.8.1 for my BitNami Redmine 2.0.3 (Windows 7)
rake redmine:migrate:plugins
Result:
Bundler could not find compatible versions for gem "builder":
In Gemfile:
cucumber (= 0.9.4) x86-mingw32 depends on
builder (~> 2.1.2) x86-mingw32
builder (3.0.0)
My gemlist is ok:
builder (3.0.0, 2.1.2)
cucumber (0.9.4)
... and many more ;)
What bundler does is it tries to match up all the dependencies of all gems in the gemfile.
This includes matching the versions of all gems with the requirements.
You have a mix of version requirements which are impossible for bundler to fulfill:
builder (~> 2.1.2) x86-mingw32
...means match version > 2.1.2, but < 2.2.0 (very strict requirement).
builder (3.0.0)
...means match only 3.0.0 (even stricter).
So you see you can't match both 2.1.2-2.2.0 and 3.0.0 at the same time. You need to loosen up your requirements or change the version numbers so that the requirements can be matched.