Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with bundle (Rails)

I'm running Ruby 1.9.3 and Rails 4.0.0, and I'm just starting to learn how to use Ruby on Rails. Whenever I type the command to create a project: rails new blog I get this error when the bundle tries to execute the "bundle install" command:

Bundler could not find compatible versions for gem "bundler":
In Gemfile:
rails (= 4.0.0) ruby depends on
  bundler (< 2.0, >= 1.3.0) ruby

Current Bundler version:
  bundler (1.2.3)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

But with the command: gem list bundle returns: bundler (1.3.5, 1.2.3) And the command: bundle -v returns: Bundler version 1.3.5

I don't know why that's happening, I appreciate any help, thanks.

like image 858
lpFranz Avatar asked Dec 05 '25 13:12

lpFranz


2 Answers

Try removing the version in your Gemfile. Just keep

gem 'bundler'

Now run

bundle update
like image 83
Prabhakar Undurthi Avatar answered Dec 08 '25 08:12

Prabhakar Undurthi


Try check Gemfile.lock for used bundler version.

You also can try to uninstall old version:

gem uninstall bundler --version 1.2.3
like image 22
justi Avatar answered Dec 08 '25 07:12

justi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!