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
Related
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.)
I remove my Gemfile.lock, change my gem 'rails', '5.2' to gem 'rails', '6.0' and do bundle install.
I get a lot of dependency errors. But I cannot understand them because they seem okay.
I was getting errors like this:
Bundler could not find compatible versions for gem "pry":
In Gemfile:
guard-rspec (~> 4.7.0) was resolved to 4.7.3, which depends on
guard (~> 2.1) was resolved to 2.16.2, which depends on
pry (>= 0.9.12)
pry-doc was resolved to 1.1.0, which depends on
pry (~> 0.11)
pry-nav was resolved to 0.3.0, which depends on
pry (>= 0.9.10, < 0.13.0)
pry-rails was resolved to 0.3.9, which depends on
pry (>= 0.10.4)
and a lot more.. seems in the above that the dependencies should be fine, i.e. 0.11 for pry-doc is greater than all the others and they all specify greater than or equal.
Turns out specifying the exact latest version of rails fixed the problem.
originally in my Gemfile I had:
gem 'rails', '6.0'
but when I did
gem 'rails', '6.0.3.6'
and bundle install, I got no such dependency errors
When I desire to start the server in my GitBash, I get the next message in red letters:
Bundler could not find compatible versions for gem "sass":
In snapshot (Gemfile.lock):
sass (= 3.5)
In Gemfile:
sass (= 3.5) x86-mingw32
compass (>= 1.0.3, ~> 1.0) x86-mingw32 was resolved to 1.0.3, which depends on
sass (< 3.5, >= 3.3.13) x86-mingw32
sass-rails (>= 5.0.7, ~> 5.0) x86-mingw32 was resolved to 5.0.7, which depends on
sass (~> 3.1) x86-mingw32
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
I really have been breaking my head on this for the past few hours. Could somebody help?
Replacing sass-rails with gem 'sass-rails', '~> 6.0.0.beta1' will resolve your issue. and use sass version 3.4
if you don't want to go for a beta version of sass rails then you have to downgrade compass to gem 'compass', '~> 0.12.1'.
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.
My rails version is 3.2.12.
I am trying to implement gem "joyride-rails", "~> 0.0.14" in my application, but it clashes with some of my other gems. Already in my Gemfile:
gem "haml-rails", ">= 0.4"
gem 'activeadmin-mongoid', github: 'elia/activeadmin-mongoid', branch: 'active-admin-spec-suite'
When I run the bundle command, I get this error:
Bundler could not find compatible versions for gem "haml":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
haml (~> 3.1) ruby
haml-rails (>= 0.4) ruby depends on
haml (4.0.3)
So, if I add the gem "haml", "~> 4.0.3" the new bundle clash is:
Bundler could not find compatible versions for gem "bourbon":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
bourbon (~> 2.0) ruby
activeadmin-mongoid (>= 0) ruby depends on
bourbon (3.1.8)
And if I then add the gem "bourbon", "~> 3.1.8" I get this new clash:
Bundler could not find compatible versions for gem "bourbon":
In Gemfile:
joyride-rails (~> 0.0.14) ruby depends on
bourbon (~> 2.0) ruby
bourbon (3.1.8)
What to do?
Github Issue
The gem currently can't be used with the latest version of haml. (c)
I think, u can downgrade your haml version, if possible.