I'm fairly new to rails and I encountered this gem conflict, while running bundle install, between ActiveSupport and threetaps-client (which I need to use for my project).
I tried removing the Gemfile.lock file and running bundle install again but it gave me the same error message again. I also tried running bundle update which also gave the same result :(
Bundler could not find compatible versions for gem "activesupport":
In snapshot (Gemfile.lock):
activesupport (3.2.13)
In Gemfile:
threetaps-client (>= 0) ruby depends on
activesupport (~> 3.0.0) ruby
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
The issue here is that you are using Rails 3.2 (and thus, activesupport 3.2). However, threetaps-client is version locked to rails/activesupport 3.0.x. The easiest solution to this would be to downgrade Rails to 3.0 in your Gemfile with:
gem "rails", "~> 3.0"
And then remove the Gemfile.lock and bundle install again. You should be good to go after that.
EDIT
I was able to get the gem to support activesupport 3.2 (I think). The tests do not pass on this branch, but they did not pass on master either. I assume this probably has to do with credentials or something. Update your Gemfile to use this repo for threetaps-client
gem "threetaps-client", git: "git#github.com:ehowe/3taps-Ruby-Client"
Insert required "your mileage may vary" warning here.
Related
Hi everyone I have recently started developing with this framework, I am having difficulties in starting a project locally.
When I go to run a
bundle install
I get this error message:
Bundler could not find compatible versions for gem "globalize": In Gemfile:
globalize java
globalize-accessors java was resolved to 0.2.1, which depends on
globalize (>= 5.0.0, ~> 5.0)
Could not find gem 'globalize (>= 5.0.0, ~> 5.0)', which is required by gem 'globalize-accessors', in any of the relevant sources: https://github.com/globalize/globalize.git (at master#bcfa30f)
Bundler could not find compatible versions for gem "globalize-accessors": In snapshot (Gemfile.lock):
globalize-accessors (= 0.2.1)
In Gemfile:
globalize-accessors java
Running `bundle update` will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict.
this is the part of the gemfile concerned:
########## Globalization
gem "route_translator", git: "https://github.com/enriclluelles/route_translator.git"
gem 'activemodel-serializers-xml'
gem 'globalize-accessors'
gem 'globalize', github: 'globalize/globalize'
gem 'kaminari', github: "amatsuda/kaminari", branch: '0-17-stable'
gem "kaminari-i18n"
i also tried to run bundle update but it didn't fix the problem
Ruby version:2.3.3
gem -v:2.5.2
The version of globalize in your gemfile seems not to correspond to the version required for globalize-accessors.
Try installing globalize like so :
gem 'globalize', "~> 5.0"
The gem hashdiff has problems with another gem using the same namespace, it gives the deprecation warning:
The HashDiff constant used by this gem conflicts with another gem of a similar name. As of version 1.0 the HashDiff constant will be completely removed and replaced by Hashdiff. For more information see https://github.com/liufengyun/hashdiff/issues/45.
(The link is to a long conversation, even reading it I am not sure how to upgrade this particular gem)
My /Gemfile does not have hashdiff in, however there is a gem which depends on it, in /Gemfile.lock there is hashdiff (0.4.0).
To force hashdiff to upgrade to 1.0, I added gem 'hashdiff', '~> 1.0' to /Gemfile and ran bundle update hashdiff but:
Fetching gem metadata from https://rubygems.org/.
Could not find gem 'hashdiff (~> 1.0)' in any of the gem sources listed in your Gemfile.
Alas rubygems does not have version 1.0.
How are we people dealing with the deprecation warning? Ignoring it until the gem becomes available? Or something else?
Bundler doesn't consider beta versions of a gem when solving dependencies unless you explicitly tell bundler to use such a beta version.
I would just add that gem together with a comment to my Gemfile
# FIXME: Force bundler to use the beta version of the hashdiff gem
# `hashdiff` is a dependency of the `webmock` gem. Feel free to remove
# the following line from this Gemfile as soon as hashdiff 1.0.0 is
# officially released.
gem 'hashdiff', '>= 1.0.0.beta1'
gem 'webmock'
and then run bundle update hashdiff.
Update
Version 1.0.0 of the hashdiff gem was released on 2019-07-15. Therefore this workaround is not needed anymore and a bundle update hashdiff – without the need to update the Gemfile first – should solve the issue.
I am trying to update Rails to 5.0.0.beta1, and I get errors that look like this:
Bundler could not find compatible versions for gem "minitest":
In Gemfile:
rails (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
activejob (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends on
activesupport (= 5.0.0.beta1) was resolved to 5.0.0.beta1, which depends
on minitest (~> 5.1)
minitest-rails-capybara was resolved to 0.0.1, which depends on
minitest-rails was resolved to 0.5, which depends on
minitest (~> 4.0)
No gem, including minitest-rails-capybara, has its version set explicitly in my Gemfile. There is no Gemfile.lock file in my app (I removed the existing one in the upgrade branch.)
minitest-rails-capybara is the latest version in the current gemset (and in others.) Why am I getting this error?
EDIT Even after starting with a new app, (rails new) if I add these lines to the Gemfile, I get the above errors:
group :test do
gem 'minitest-spec-rails'
gem 'minitest-rails-capybara'
end
Versions:
Ruby: 2.3.0
Bundler: 1.11.2
gem: 2.5.1
Well, I guess I'm jumping the gun somewhat here - those gems at least don't have their Rails5-compatible versions on Rubygems.org.
Pointing directly to Github fixes this:
gem 'minitest-rails', git: 'https://github.com/blowmage/minitest-rails', branch: 'rails5'
gem 'minitest-spec-rails'
gem 'minitest-rails-capybara', git: 'https://github.com/blowmage/minitest-rails-capybara', branch: 'rails5'
I got a problem with a new version of spree gem (branch: '2-3-stable'). When i try to install it, I receive this error.
my_store$ rails server
The git source https://github.com/spree/spree_gateway.git is not yet checked out. Please run `bundle install` before trying to start your application
my_store$ bundle install
Bundler could not find compatible versions for gem "i18n":
In Gemfile:
spree (= 2.3.1) ruby depends on
spree_core (= 2.3.1) ruby depends on
i18n (= 0.6.9) ruby
rails (= 4.1.2) ruby depends on
activesupport (= 4.1.2) ruby depends on
i18n (0.6.11)
But according to gem list i got both of this gems installed i18n (0.6.11, 0.6.9). Can someone help me to fix this problem
Copy from comment section:
Sorry. i figured it out myself simple execution of bundle update and then bundle install command fixed my issue
I have a site running with nginx/unicorn/sinatra (bundler/rvm).
After my last bundle update, I am getting an error:
in `raise_if_conflicts': Unable to activate dm-serializer-1.2.1, because multi_json-1.3.5 conflicts with multi_json (~> 1.0.3)
My Gemfile is:
source "http://rubygems.org"
gem 'unicorn'
gem 'sinatra'
gem 'datamapper'
gem 'dm-mysql-adapter'
gem 'haml'
gem 'sass'
gem 'omniauth-twitter'
Gemfile.lock does not have any reference to multi_json 1.0.3
Any ideas?
Solution was:
check Gemfile.lock to see which gem(s) bring in later version (in this case - omniauth-twitter)
Find a version of 'offender' that does not require too high version
Rollback later versions, lock to a proper version in Gemfile
In this particular case, Gemfile that works needed lines:
gem 'omniauth-twitter', '0.0.9'
gem 'multi_json', '~> 1.0.3'
One of the gems in your bundle has an older version of multi_json as a dependency it looks like. See if bundle viz tells you. You'll need to install the ruby-graphviz gem and graphviz itself if you don't have them installed already, though.
Another way to see what's up is to add multi_json to your gemfile at the version you're trying to upgrade to, then do a bundle install and see what errors come out.
This is how to fix this problem:
rvm uninstall multi_json
It will tell you that you have many versions installed, show you a list of them, and ask you which one exactly you want to uninstall.
Try the first one, if it tells you that it is used by some other gem, try the second one, and so on. Keep deleting all the unused versions until only one remains.
This is how I do it, but there may be some clearner solution. If anyone knows it, thanks for sharing it with us.