Bundler - could not find compatible versions for gem - ruby-on-rails

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.

Related

Bundler could not find compatible versions for gem. The version is within range

Bundler is giving this error when I run bundle install, but actionmailer 5.2.6 is within the range >= 5.2 and < 8! Why is it giving an error? It's doing this for multiple gems. The dependency is within range for all of them.
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
exception_notification (~> 4.2) was resolved to 4.5.0, which depends on
actionmailer (< 8, >= 5.2)
rails (~> 5.2.6) was resolved to 5.2.6, which depends on
actionmailer (= 5.2.6)
Here is an example of another nonsensical error. Obviously 5.0 <= 5.2.6 < 7:
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (~> 5.2.6)
rails_admin (~> 2.0.1) was resolved to 2.0.2, which depends on
rails (>= 5.0, < 7)
I deleted Gemfile.lock. Bundler version 2.3.9. Gemfile
It was because of this line:
gem 'flip', '~>1.1', :git => 'https://github.com/pda/flip.git'
When commented, it works. When uncommented, it spits out nonsensical errors and buried in the errors is this:
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
flip (~> 1.1) was resolved to 1.1.1, which depends on
activesupport (>= 4.0, <= 5.2)
rails (~> 5.2.6) was resolved to 5.2.6, which depends on
activesupport (= 5.2.6)
I think that is the ONLY error it should have printed out, but that is probably a bug in Bundler. Now I must manually implement that Gem or think of a monkey patch. (I dislike unnecessary and superficial dependencies.)

Issue in install old Ruby Gems

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

Bundler on linux doesn't accept rcx versions?

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.

Bundler could not find compatible versions for gem "multi_json"

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.

Feedzirra incompatible with Rails 3.1.1?

Bundler could not find compatible versions for gem "builder": In
Gemfile:
rails (= 3.1.1) depends on
builder (~> 3.0.0)
feedzirra (~> 0.1.1) depends on
builder (2.1.2)
Does it mean, that the latest feedzirra version is incompatible with the latest rails version?
According to archiloque, "It's already done in commit 26532da, I just need to release a new version the includes this change"
For now, putting this in your Gemfile should fix that issue:
gem 'feedzirra', :git => 'https://github.com/pauldix/feedzirra.git'
The specific revision that worked for me is:
remote: https://github.com/pauldix/feedzirra.git
revision: dee1454980e7b93022776cd047ad419da3999332

Resources