Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
11
Help us understand the problem. What is going on with this article?
@Yinaura

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

More than 5 years have passed since last update.

問題

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
11
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Yinaura
https://twitter.com/yumainaura / mv here http://qiita.com/Yumainaura / yumainaura / 稲浦悠馬 / いなうらゆうま

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
11
Help us understand the problem. What is going on with this article?