gem install permission problem

后端 未结 5 845
长发绾君心
长发绾君心 2020-11-30 20:31
qichunren@zhaobak:~> gem install hpricot
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don\'t have write permissions into the /opt/ruby-enter         


        
5条回答
  •  鱼传尺愫
    2020-11-30 20:54

    If you're using rbenv and this is happening, you need to add the following to your .bash_profile:

    export RBENV_ROOT="$HOME/.rbenv"
    
    if [ -d $RBENV_ROOT ]; then
      export PATH="$RBENV_ROOT/bin:$PATH"
      eval "$(rbenv init -)"
    fi
    

提交回复
热议问题