LoginSignup
15
9

More than 1 year has passed since last update.

Rails | `bin_path': can't find gem bundler に対処する

Last updated at Posted at 2015-12-29

問題

ruby のバージョンを上げると、bundler が動かなくなった。( rbenv + .ruby-versions )

$ bundle install

/Users/yinaura/.rbenv/versions/2.2.4/lib/ruby/2.2.0/rubygems.rb:243:in
 `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)
	from /Users/yinaura/projects/project/bin/bundle:4:in `<main>'

解決

bundler の参照ディレクトリが変わって。gem が見つけられなくなっていた。
なので bundler をインストールし直す。

bundler の再インストール

$ gem install bundler

こうすると ruby のバージョンに応じた bin が出来る。

.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/bundler-1.11.2/exe/bundle

Gem の再インストール

Gem も全部無いので、インストールし直す。

$ bundle install

これで動いた。

環境

  • ruby 2.0.0 => 2.4.4
  • Bundler version 1.11.2

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

メンター受付

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