LoginSignup
5
5

More than 5 years have passed since last update.

bundlerのVersionを固定して、実行する

Last updated at Posted at 2015-05-28

問題

他の人が作ったライブラリーのspecを実行したときに、下記のエラーがでて困った。

$ bundle install

出力結果

Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (~> 1.6.2) ruby

  Current Bundler version:
    bundler (1.9.9)
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.6.2) ruby in any of the sources

解決

$ gem install bundler -v '1.6.2'
$ bundle _1.6.2_ install

Rspec

$ bundle _1.6.2_  exec rspec ./spec
5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5