find_spec_for_exe': can't find gem bundler (>= 0.a) (Gem::GemNotFoundException)

后端 未结 15 1233
伪装坚强ぢ
伪装坚强ぢ 2020-11-29 17:14

I used sudo bundle install and that might be the cause of the issue?

Now I have:

  • gem -v 2.6.14
  • ruby -v
相关标签:
15条回答
  • 2020-11-29 18:05

    Open Gemfile.lock, which is to be found in the root of your app folder. Scroll to the end of the file and see the bundler version used. Then you make sure you install the bundler version used:

    gem install bundler -v x.xx.xx
    

    Or - delete the Gemfile.lock and bundle if you have higher bundler version installed.

    The choice is yours, my friend.

    0 讨论(0)
  • 2020-11-29 18:08

    to install bundler that matches with your Gemfile.lock use:

    gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
    
    0 讨论(0)
  • 2020-11-29 18:12
    gem update --system
    

    will update the rubygems and will fix the problem.

    0 讨论(0)
提交回复
热议问题