Installing Ruby gems not working with Home Brew

后端 未结 7 592
盖世英雄少女心
盖世英雄少女心 2020-12-07 13:57

The gems I install via sudo gem install ... can\'t be executed (I get a command not found). They seem to install into /usr/local/Cellar/

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-07 14:25

    You can be fine with ruby installed by homebrew too.. You just lack the functionality of custom gemsets with homebrew.

    first do:

    sudo nano /etc/paths
    

    this will bring up nano editor,

    then add the following to the paths:

    /usr/local/Cellar/ruby/1.9.3-p194/bin
    

    your version of ruby will probably vary.

    Thats it. It should now detect your gems.

    Oh, btw, you need to Ctrl+X > y > ENTER to save a file in nano.

提交回复
热议问题