LoginSignup
13
9

More than 5 years have passed since last update.

bundlerのバージョンエラーが起きた

Posted at

何が起きたか?

普段railsアプリケーションでbundler --version 1.10.5を使っているのですが、bundlerのアップデートをした際にbundle exec コマンドを叩くと、エラーが発生しました。

出現したエラーメッセージ

Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    bundler (= 1.10.5)

    rails-footnotes was resolved to 4.1.8, which depends on
      rails (>= 3.2) was resolved to 5.0.5, which depends on
        bundler (>= 1.3.0)

  Current Bundler version:
    bundler (1.16.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 (= 1.10.5)', which is required by gem 'rails (>= 3.2)', in any of the relevant sources:
  rubygems repository https://rubygems.org/ or installed locally

対処方法

bundlerのアンインストールを実行しました。

$ gem uninstall bundler

選択肢が出現

Select gem to uninstall:
 1. bundler-1.10.5
 2. bundler-1.16.1
 3. All versions

2を選択。

bundlerのバーションを確認

$ rbenv exec gem list | grep bundler
bundler (1.10.5)

→ 1.16.1が消えている。
めでたし。

13
9
1

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
13
9