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

后端 未结 15 1293
伪装坚强ぢ
伪装坚强ぢ 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 17:54

    In my case the above suggestions did not work for me. Mine was little different scenario.

    When i tried installing bundler using gem install bundler .. But i was getting

    ERROR:  While executing gem ... (Gem::FilePermissionError)
        You don't have write permissions for the /Library/Ruby/Gems/2.3.0 directory.
    

    then i tried using sudo gem install bundler then i was getting

    ERROR:  While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /usr/bin directory.
    

    then i tried with sudo gem install bundler -n /usr/local/bin ( Just /usr/bin dint work in my case ).

    And then successfully installed bundler

    EDIT: I use MacOS, maybe /usr/bin din't work for me for that reason (https://stackoverflow.com/a/34989655/3786657 comment )

提交回复
热议问题