I currently am running Rails 5.0.2 with bundler(<2.0, >=1.3.0). This morning when I ran 'gem install bundler', it ended up installing bundler 2.0.1 which is now incompatible with Rails 5.0.2. I'm wondering if I should be upgrading my Rails version or downgrading the bundler version. Please see the log from my jenkins build below.
gem install bundler
Successfully installed bundler-2.0.1
Parsing documentation for bundler-2.0.1
Done installing documentation for bundler after 5 seconds
1 gem installed
bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (~> 5.0.2) was resolved to 5.0.2, which depends on
bundler (< 2.0, >= 1.3.0)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
try
gem update --system
after
bundle install
Related
Bundler could not find compatible versions for gem "bundler":
The error is below
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (~> 2.2)
rails (= 6.1.4.6) was resolved to 6.1.4.6, which depends on
bundler (>= 2.2.0)
Current Bundler version:
bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 2.2)', which is required by gem 'rails (= 6.1.4.6)', in any of the relevant sources:
the local ruby installation
Your solution is actually in the error message that you are getting. Run
gem install bundler
to install the latest version of bundler (that should satisfy the constraints
You can also specify a particular version of any gem by specifying the version flag. For example.
gem install bundler -v 2.2.0
gem install bundler --version 2.2.19 --default
I have several Rails 5.2 apps in the same RVM gemset. I have executed bundle update in several of them. All of them updated the rake gem from 12.3.3 to the current version 13.0.1 except for one that did not update the rake gem.
Here are the first few messages in my bundle update command for an app that updated the rake gem.
[oldapp (master)]$ cd ~/sites/oldapp && rvm use 2.6.3#currentgemset --default
Using /Users/server1/.rvm/gems/ruby-2.6.3 with gemset currentgemset
[oldapp (master)]$ bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Using rake 13.0.1 (was 12.3.3)
Using concurrent-ruby 1.1.6 (was 1.1.5)
Using i18n 1.8.2 (was 1.6.0)
Here are the first few messages in my bundle update command for the app that didn't the rake gem.
[oldapp (master)]$ cd ~/sites/currentapp && rvm use 2.6.3#currentgemset --default
Using /Users/server1/.rvm/gems/ruby-2.6.3 with gemset currentgemset
[currentapp (master)]$ bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.........
Using rake 12.3.3
Using concurrent-ruby 1.1.6 (was 1.1.5)
Using i18n 1.8.2
I tried this.
[currentapp (master)]$ gem update rake
Updating installed gems
Nothing to update
I also tried this.
[currentapp (master)]$ bundle update rake
....
Bundler attempted to update rake but its version stayed the same
Bundle updated!
Both versions of the rake gem are in my gemset.
I have not found other solutions to this. How can I update the rake gem?
One of your dependencies (or your Gemfile itself) has a requirement for rake version, that does not pass 13.0.1.
Look in Gemfile.lock to find which gem depends on rake and prevents its update, you need to update that too (if gem has already updated)
When I try to bundle the gemfile of a new project I get :
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler-audit was resolved to 0.6.0, which depends on
bundler (~> 1.2)
rails (~> 5.2) was resolved to 5.2.1, which depends on
bundler (>= 1.3.0)
Current Bundler version:
bundler (2.0.2)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.2)', which is required by gem 'rails (~>
5.2)', in any of the sources.
As a result I run gem install bundler '~> 1.2'.
Now when I run gem list bundler, I have those 2 versions 2.0.2, 1.17.3
I know want to bundle my gemfile with version 1.17.3
However when I run bundle _1.17.3_ install, I get :
Could not find command "_1.17.3_".
What am I doing wrong here ? How can I fix that ? Is there a way to specify directly in my rails project with which version of bundler it should download & resolve dependencies ?
Try gem install bundler -v 1.17.3 and then bundle _1.17.3_ install
https://github.com/jhu-ep-coursera/fullstack-course3-module3-movies
I use this repo , I run rake db:seed Project want sqlite update and I add gem 'sqlite3', '~> 1.3.13' in Gemfile .
Project gives an error
(base) ➜ fullstack-course3-module3-movies git:(master) ✗ bundle
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.2.4) was resolved to 4.2.4, which depends on
bundler (< 2.0, >= 1.3.0)
Current Bundler version:
bundler (2.0.1)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0, >= 1.3.0)', which is required by gem 'rails (= 4.2.4)', in any of the sources.
You got Bundler 2.0.1 installed on your computer, but apparently your Gemfile requires bundler (< 2.0, >= 1.3.0).
You can install the required bundler version like this:
gem install bundler --version=1.x.y
I just bought a new MBP and I'm trying to execute a ruby app. After I followed this tutorial Install Ruby on Rails 5.0 · macOS Sierra,
I'm still having this issue:
MBP:test_app $ gem install rails
Successfully installed rails-5.0.1
Parsing documentation for rails-5.0.1
Done installing documentation for rails after 0 seconds
1 gem installed
MBP:test_app $ rails new .
Could not find gem 'rails (= 3.0.0)' in any of the gem sources listed in your Gemfile or available on this machine.
Try running `bundle install`.
Then, I tried:
$ bundle install
And I got the following error:
Fetching gem metadata from http://rubygems.org/..........
Fetching version metadata from http://rubygems.org/..
Fetching dependency metadata from http://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 3.0.0) was resolved to 3.0.0, which depends on
bundler (~> 1.0.0)
Current Bundler version:
bundler (1.13.7)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (~> 1.0.0)', which is required by gem 'rails (=
3.0.0)', in any of the sources.
I guess I've already tried everything; installed bundler 1.0.0, reinstalled, deleted gems, removed ruby, rails, rvm, and installed everything again.
Please, any advice?
Solved!!
The problem was solved removing or commenting config.action_view.debug_rjs = true in development.rb file.
Thanks to everyone!