lpFranz
lpFranz

Reputation: 446

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.

Upvotes: 2

Views: 285

Answers (3)

Prabhakar
Prabhakar

Reputation: 6754

Try removing the version in your Gemfile. Just keep

gem 'bundler'

Now run

bundle update

Upvotes: 1

strivedi183
strivedi183

Reputation: 4831

You can also specify the version of bundler you want to use

bundle _1.3.5_ install

Upvotes: 0

justi
justi

Reputation: 4106

Try check Gemfile.lock for used bundler version.

You also can try to uninstall old version:

gem uninstall bundler --version 1.2.3

Upvotes: 1

Related Questions