1

I am not even new to ruby. I have to get an existing application running which is used as an interface to a Java application (which I understand). When I am trying to obtain all the dependencies (on Linux Mint), I am greeted with the following:

$ bundle install
Fetching gem metadata from http://rubygems.org/......
Fetching gem metadata from http://rubygems.org/..
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.1.5)

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

I tried 'gem install bundler', but this didn't work. I tried to install bundler 1.0.0, using:

$ sudo gem install bundler -v 1.0.0
Successfully installed bundler-1.0.0
1 gem installed
Installing ri documentation for bundler-1.0.0...
Installing RDoc documentation for bundler-1.0.0...

This seem to have worked, but I cannot 'switch' to it.

Jaco Van Niekerk
  • 4,180
  • 2
  • 21
  • 48

1 Answers1

2

You can specify what version of a Gem executable to use by specifying the version surrounded by underscores (_) after the command, e.g.

a_gem_executable _1.2.3_ other args

So in order to specifically run version 1.0.0 of bundler, try this:

bundle _1.0.0_ install

When I tried with 1.0.0, bundler threw an exception, so you might want to try with a more up to date version that’s still compatible with the ~> 1.0.0 specifier:

gem install bundler -v 1.0.18
bundle _1.0.18_ install

It does strike me as slightly unusual to have bundler itself specified in the Gemfile, you might be able to just remove that line as the simpler alternative.

matt
  • 78,533
  • 8
  • 163
  • 197