I deleted my gemlock file, then I ran bundle install but got these errors
Bundler could not find compatible versions for gem "railties"
gem list in Gemfile:
coffee-rails (~> 4.2) was resolved to 4.2.2, which depends on railties (>= 4.0.0)
jquery-rails (>= 4.3.1, ~> 4.3) was resolved to 4.3.1, which depends on railties (>= 4.2.0)
material-ui (~> 0.7.3.2) was resolved to 0.7.3.2, which depends on railties (~> 4.0)
rails (~> 5.1.2) was resolved to 5.1.2, which depends on railties (= 5.1.2)
sass-rails (~> 5.0) was resolved to 5.0.6, which depends on railties (< 6, >= 4.0.0)
web-console (>= 3.3.0) was resolved to 3.5.1, which depends on railties (>= 5.0)
I could get ruby version through ruby -v but couldn't even get my rails version through rails -v. What could be the problem?
Update your Gemfile’s rails entry:
- gem 'rails'
+ gem 'rails', '< 5.0'
Your Gemfile.lock was created before Rails5 era and hence open-ended dependency was fine. Now it’s resolved to Rails5, enforcing railties = 5.1.2, which all your other gems are not ready for.
Related
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
I am working on Ruby on Rails application. I am trying to upgrade the rails version from 4.2 to 5.0
I have changed the rails dependency in engine's gemspec file.
On running bundle update in engine it is showing the following error -
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
actionmailer (= 5.2.4.4)
simple_token_authentication was resolved to 1.17.0, which depends on
actionmailer (>= 3.2.6, < 7)
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
actionpack (= 5.2.4.4)
rspec-rails was resolved to 4.0.2, which depends on
actionpack (>= 4.2)
simple_token_authentication was resolved to 1.17.0, which depends on
actionpack (>= 3.2.6, < 7)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
paranoia (~> 2.2) was resolved to 2.4.3, which depends on
activerecord (>= 4.0, < 6.2)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
activerecord (= 5.2.4.4)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
factory_girl_rails was resolved to 4.9.0, which depends on
factory_girl (~> 4.9.0) was resolved to 4.9.0, which depends on
activesupport (>= 3.0.0)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
activesupport (= 5.2.4.4)
rspec-rails was resolved to 4.0.2, which depends on
activesupport (>= 4.2)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
engine was resolved to 0.0.1, which depends on
activeadmin (= 1.0.0.pre2) was resolved to 1.0.0.pre2, which depends on
rails (>= 3.2, < 5.0)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
factory_girl_rails was resolved to 4.9.0, which depends on
railties (>= 3.0.0)
engine was resolved to 0.0.1, which depends on
rails (~> 5.0) was resolved to 5.2.4.4, which depends on
railties (= 5.2.4.4)
rspec-rails was resolved to 4.0.2, which depends on
railties (>= 4.2)
I tried to delete gemfile.lock of engine and run command bundle install then it is showing the following error -
Bundler could not find compatible versions for gem "rails":
In Gemfile:
engine was resolved to 0.0.1, which depends on
activeadmin (= 1.0.0.pre2) was resolved to 1.0.0.pre2, which depends on
rails (>= 3.2, < 5.0)
engine1 was resolved to 0.0.1, which depends on
engine2 was resolved to 0.0.1, which depends on
rails (~> 5.0)
Do anyone have any idea how to resolve it? Please help!
Re-read the error message, it says exactly what's going on.
Bundler could not find compatible versions for gem "rails":
There is no single version of rails that satisfies all requirements. From your issue description I see that you're trying to update to 5, so lets see what is not okay with 5.
In Gemfile:
engine was resolved to 0.0.1, which depends on
activeadmin (= 1.0.0.pre2)
Engine depends on activeadmin with a fixed version
was resolved to 1.0.0.pre2, which depends on
rails (>= 3.2, < 5.0)
This version requires rails of at least 3.2 and less than 5.0. This disallows rails 5. You'll need to update activeadmin in engine before you update rails in the application using the engine.
This is the error I'm getting with bundle update:
Bundler could not find compatible versions for gem "railties":
In Gemfile:
coffee-rails (~> 4.1.0) was resolved to 4.1.0, which depends on
railties (< 5.0, >= 4.0.0)
rails (~> 5.2) was resolved to 5.2.0, which depends on
railties (= 5.2.0)
sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
railties (< 6, >= 4.0.0)
web-console (~> 2.0) was resolved to 2.3.0, which depends on
railties (>= 4.0)
I tried to check my rails -v and it told me to run bundle update and when I did, I got this error. Can anyone help ? I'm quite lost
This error occurs because Bundler attempts to satisfy the version requirements of the dependencies, but is unable to do so as rails 5.2.0 requires the gem railties in the version 5.2.0, while coffee-rails 4.1.0 needs a version of railties which is less than 5.0 but greater than or equal 4.0.0. Those two requirements are conflicting with each other.
Luckily, solving that problem is really easy: all you need to do is to bump the version requirement of the coffee-rails gem to ~> 4.2. This can be done by changing the line gem "coffee-rails", "~> 4.1.0" (or similar) in your Gemfile to the following:
gem "coffee-rails", "~> 4.2"
After that change, bundle update should work just fine.
In Gemfile:
protected_attributes x86-mingw32 was resolved to 1.0.0, which depends on
activemodel (< 5.0, >= 4.0.0.beta) x86-mingw32
rails (~> 5.0.4) x86-mingw32 was resolved to 5.0.4, which depends on
activemodel (= 5.0.4) x86-mingw32
rails (~> 5.0.4) x86-mingw32 was resolved to 5.0.4, which depends on
activemodel (= 5.0.4) x86-mingw32
web-console (>= 3.3.0) x86-mingw32 was resolved to 3.5.1, which depends on
activemodel (>= 5.0) x86-mingw32
I already tried to do bundle, bundle install and bundle update but it doesnt work.
I made some research and turns out that the gem protected_attributes does not work with Rails 5, but the community made another that does work, this gem is protected_attributes_continued, so i just changed the gem in the Gemfile
When trying to install a rails gem that ships the twitter-bootstrap-rails into my application, I got the following issue:
C:\workinrails\mytrelloapp>bundle install
Bundler could not find compatible versions for gem "railties":
In snapshot (Gemfile.lock):
railties (= 4.2.5.1)
In Gemfile:
coffee-rails (~> 4.1.0) x86-mingw32 was resolved to 4.1.1, which depends on
railties (< 5.1.x, >= 4.0.0) x86-mingw32
jquery-rails x86-mingw32 was resolved to 4.2.2, which depends on
railties (>= 4.2.0) x86-mingw32
rails (= 4.2.5.1) x86-mingw32 was resolved to 4.2.5.1, which depends on
railties (= 4.2.5.1) x86-mingw32
sass-rails (~> 5.0) x86-mingw32 was resolved to 5.0.6, which depends on
railties (< 6, >= 4.0.0) x86-mingw32
twitter-bootstrap-rails x86-mingw32 was resolved to 4.0.0, which depends on
railties (>= 5.0.1, ~> 5.0) x86-mingw32
web-console (~> 2.0) x86-mingw32 was resolved to 2.3.0, which depends on
railties (>= 4.0) x86-mingw32
After getting this "Running bundle update will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict." message, I got a new issue telling me that Bundler could not find compatible versions for gem "actionpack"
To summarize, I just did these steps:
Step 1 - Pasted gem 'twitter-bootstrap-rails', :git => 'git://github.com/seyhunak/twitter-bootstrap-rails.git' to my gemfile.
Step 2 - Bundle install
And I was hoping to arrive to Step 3 - rails generate bootstrap:install static
What's the issue?