Ruby Gems returns “command not found”

后端 未结 3 571
没有蜡笔的小新
没有蜡笔的小新 2020-12-24 13:41

Ubuntu 9.10

Just installed newgem

gem install newgem

and when i try

newgem new_project

I get

3条回答
  •  悲哀的现实
    2020-12-24 14:25

    Your $PATH variable needs to include the exact path to your Ruby's bin directory. Adding a directory to the PATH does not include it's subfolders. Try adding the bin directory via:

    export PATH=$PATH:/home/adam/.gem/ruby/1.8/bin
    

    or if you installed the gem using sudo:

    export PATH=$PATH:/usr/lib/ruby/gems/1.8/bin
    

    You might want to add this to your .bashrc file, so that you don't have to set this manually every time your open up a new bash.

提交回复
热议问题