LoginSignup
13
7

More than 3 years have passed since last update.

Gem::GemNotFoundExceptionと出てきたときの対処法

Posted at

最近の勉強で学んだ事を、ノート代わりにまとめていきます。
主に自分の学習の流れを振り返りで残す形なので色々、省いてます。
Webエンジニアの諸先輩方からアドバイスやご指摘を頂けたらありがたいです!

どういうエラーなのか

railsのリポジトリをクローンしてきてちゃんと動くか確かめようとした時に発生しました!
やったことはbundle installをしたら最後に以下のような感じのものが出てきました

//省略
Traceback (most recent call last):
    2: from /hoge/ruby/bin/bundle:23:in `<main>'
    1: from /hoge/ruby-2.5.3/lib/ruby/2.5.0/rubygems.rb:308:in `activate_bin_path'
/hoge/ruby-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)

RubyGemsとBundler2のバージョンの組み合わせによって起こる問題

公式からの説明
An update on the Bundler 2 release

公式から出ている説明の通り

$ gem install bundler -v '1.17.3'

と入力すれば解決!
さあ、次のエラーが待っている。

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