115
84

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[エラーメッセージ] can't find gem bundler (>= 0.a) with executable bundler (Gem::GemNotFoundException)

Posted at

# 事象
1 Rubyのバージョンを2.5.1に


$ rbenv install 2.5.3
$ rbenv local 2.5.3

2 新しいバージョンに即したbundlerをinstall

$ rbenv exec gem install bundler

3 bundle install

$ bundle install
Traceback (most recent call last):
	2: from /Users/<user名>/.rbenv/versions/2.5.3/bin/bundle:23:in `<main>'
	1: from /Users/<user名>/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/Users/<user名>/.rbenv/versions/2.5.3/lib/ruby/2.5.0/rubygems.rb:289:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)

原因

Gemfile.lockに指定されているbundlerのバージョンと、bundlerのバージョンが異なっている

Gemfile.lock
<省略>
BUNDLED WITH
   1.17.3
$ bundler -v
Bundler version 2.0.1

対処法

bundlerのバージョンをGemfile.lockのものと合わせる

$ gem uninstall bundler -v 2.0.1
$ gem install bundler -v 1.17.3
115
84
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
115
84

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?