bundler cannot find a compatible version when I think it should - ruby-on-rails

I get this message from Bundler
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (= 5.1.7) was resolved to 5.1.7, which depends on
actionpack (= 5.1.7)
simple_form was resolved to 5.0.3, which depends on
actionpack (>= 5.0)
Seems to me 5.1.7 should satisfy >=5.0 so actionpack 5.1.7 should be compatible.
What am I missing?

Related

Bundler could not find compatible versions

I have multiple gems failing on my app. My bundler is not able to find compatible versions for all. I also do not have a 'Gemfile.lock' and it does not get created on bundle install. As follows:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
draper was resolved to 2.1.0, which depends on
actionpack (>= 3.0)
jquery-datatables-rails (~> 3.3.0) was resolved to 3.3.0, which depends on
actionpack (>= 3.1)
rails (= 4.1.6) was resolved to 4.1.6, which depends on
actionpack (= 4.1.6)
rails-api was resolved to 0.4.1, which depends on
actionpack (>= 3.2.11)
ransack was resolved to 1.8.10, which depends on
actionpack (< 5.2, >= 3.0)
redis-rails was resolved to 5.0.2, which depends on
redis-actionpack (< 6, >= 5.0) was resolved to 5.1.0, which depends on
actionpack (< 7, >= 4.0)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
acts_as_api (= 1.0.1) was resolved to 1.0.1, which depends on
activemodel (>= 3.0.0)
carrierwave (>= 1.0.0.beta, < 2.0) was resolved to 1.3.2, which depends on
activemodel (>= 4.0.0)
paperclip (~> 4.3.2) was resolved to 4.3.7, which depends on
activemodel (>= 3.2.0)
rails (= 4.1.6) was resolved to 4.1.6, which depends on
activemodel (= 4.1.6)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
activerecord-postgres-hstore was resolved to 0.7.8, which depends on
activerecord (>= 3.1)
audited (~> 4.7) was resolved to 4.8.0, which depends on
activerecord (< 5.3, >= 4.0)
rails (= 4.1.6) was resolved to 4.1.6, which depends on
activerecord (= 4.1.6)
I am trying it again with the following specifications and getting the same result.
bundler: 1.16.6
rails: 4.1.6
ruby: 2.3.8
ubuntu: 18.04
I can see my gems when I do gem list but it still says bundler is not able to find anything for rails 4.1.6.
Add source in your Gemfile like below:
Gemfile
source 'https://rubygems.org'
delete everything form your Gemfile.lock and run bundle install

During Ruby and Rails upgrade Bundler showing dependency error

please help me here, I was upgrading ruby and rails and also dependent gems need upgrades.
Earlier the ruby version was 2.3.0 and rails was 4.2.x, now upgrading to 2.6.0 and rails to 6.0.4
If you see below error, actionpack is resolved to 6.0.4 and public_activity also needs actionpack >=3.0.0 which means 6.0.4 should be acceptable and obviously rails using version = 6.0.4, So why its an error. can some expert throw some knowledge on it.
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
actionpack (~> 6.0, >= 6.0.4)
public_activity (~> 1.6, >= 1.6.4) was resolved to 1.6.4, which depends on
actionpack (>= 3.0.0)
rails (= 6.0.4) was resolved to 6.0.4, which depends on
actionpack (= 6.0.4)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
activemodel (~> 6.0, >= 6.0.4)
active_model_otp was resolved to 1.2.0, which depends on
activemodel
paperclip (~> 6.1) was resolved to 6.1.0, which depends on
activemodel (>= 4.2.0)
rails (= 6.0.4) was resolved to 6.0.4, which depends on
activemodel (= 6.0.4)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
activesupport (~> 6.0, >= 6.0.4)
delayed_job (~> 4.1, >= 4.1.9) was resolved to 4.1.9, which depends on
activesupport (>= 3.0, < 6.2)
factory_girl_rails (= 4.2.1) was resolved to 4.2.1, which depends on
factory_girl (~> 4.2.0) was resolved to 4.2.0, which depends on
activesupport (>= 3.0.0)
jbuilder (~> 2.10) was resolved to 2.11.2, which depends on
activesupport (>= 5.0.0)
paperclip (~> 6.1) was resolved to 6.1.0, which depends on
activesupport (>= 4.2.0)
rails (= 6.0.4) was resolved to 6.0.4, which depends on
activesupport (= 6.0.4)
Bundler could not find compatible versions for gem "capybara":
In Gemfile:
capybara (= 2.1.0)
cucumber-rails (= 1.4.0) was resolved to 1.4.0, which depends on
capybara (>= 1.1.2)
Bundler could not find compatible versions for gem "rack":
In Gemfile:
rails (= 6.0.4) was resolved to 6.0.4, which depends on
actionpack (= 6.0.4) was resolved to 6.0.4, which depends on
rack (~> 2.0, >= 2.0.8)
sprockets (= 2.11.0) was resolved to 2.11.0, which depends on
rack (~> 1.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 6.0.4)
cucumber-rails (= 1.4.0) was resolved to 1.4.0, which depends on
rails (>= 3.0.0)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
coffee-rails (~> 5.0) was resolved to 5.0.0, which depends on
railties (>= 5.2.0)
devise was resolved to 4.8.0, which depends on
railties (>= 4.1)
doorkeeper (= 4.2.5) was resolved to 4.2.5, which depends on
railties (>= 4.2)
factory_girl_rails (= 4.2.1) was resolved to 4.2.1, which depends on
railties (>= 3.0.0)
rails (= 6.0.4) was resolved to 6.0.4, which depends on
railties (= 6.0.4)
Bundler could not find compatible versions for gem "rotp":
In Gemfile:
rotp (~> 3.3.0)
active_model_otp was resolved to 1.2.0, which depends on
rotp
Bundler could not find compatible versions for gem "will_paginate":
In Gemfile:
will_paginate (= 3.0.5)
bootstrap-will_paginate (= 0.0.10) was resolved to 0.0.10, which depends on
will_paginate
I'm answering my own question, Since It got resolved after several iterations.
I removed Gemfile.lock and in Gemfile I start entering Gems one by one and then run bundle install each time, then eventually this problem did not occur.

Getting actionpack dependency issue

While running bundle install or running any other command getting this issue
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
activerecord-session_store was resolved to 1.1.3, which depends on
actionpack (>= 5.2)
rails (~> 5.1.7) was resolved to 5.1.7, which depends on
actionpack (= 5.1.7)
I have multiple version installed in my machine.I have created the rails app using the specific version and getting this issue

Upgrading Rails 5.1 to 5.2, can't find gem versions, but seems like all the requirements are met

Here's a fragment from the log.
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
active_model_serializers was resolved to 0.10.10, which depends on
actionpack (>= 4.1, < 6.1)
rails (= 5.2.4.1) was resolved to 5.2.4.1, which depends on
actionpack (= 5.2.4.1)
rails-controller-testing (= 0.1.1) was resolved to 0.1.1, which depends on
actionpack (~> 5.x)
I just don't get what exactly it is missing. From what I understand, actionpack 5.2.4.1 fits all of the requirements from other gems, but something is not happy. There are bunch of other gems that appear to have similar issues, where at least at the first glace there shouldn't be any conflicts.
Any suggestions on how to fix that?

Bundler could not find compatible versions for gem "actionpack":

Pardon my lack of knowledge as I am learning RoR.
when I run bundle update I get this error.
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (= 4.2.2) x64-mingw32 was resolved to 4.2.2, which depends on
railties (= 4.2.2) x64-mingw32 was resolved to 4.2.2, which depends on
actionpack (= 4.2.2) x64-mingw32
rails (= 4.2.2) x64-mingw32 was resolved to 4.2.2, which depends on
railties (= 4.2.2) x64-mingw32 was resolved to 4.2.2, which depends on
actionpack (= 4.2.2) x64-mingw32
rails (= 4.2.2) x64-mingw32 was resolved to 4.2.2, which depends on
railties (= 4.2.2) x64-mingw32 was resolved to 4.2.2, which depends on
actionpack (= 4.2.2) x64-mingw32
refinerycms (~> 3.0) x64-mingw32 was resolved to 3.0.0, which depends on
refinerycms-core (= 3.0.0) x64-mingw32 was resolved to 3.0.0, which
depends on
actionpack (< 5.0, >= 4.2.3) x64-mingw32
C:\Ruby200-x64\my_new_application>ruby --v
ruby: invalid option --v (-h will show valid options) (RuntimeError)
Here is my ruby version
ruby 2.0.0p648 (2015-12-16) [x64-mingw32]
actually rails was working perfectly until I decided to install refinerycms from here. following the guideline posted on that page.
I searched this error and people suggested bundle update or bundle install but neither of them worked.
The problem is that you're using Rails 4.2.2 which uses ActionPack 4.2.2 while Refinery CMS wants at least 4.2.3. If you update Rails (probably need to adapt your Gemfile to use a newer version, like ~> 4.2.3), everything should be fine.
I think the version of refinerycms you are using depends on Rails 4.2.3 and you are using 4.2.2. Can you try either upgrading Rails to 4.2.3 or downgrading Refinerycms to one that supports 4.2.2?

Resources