qichunren@zhaobak:~> gem install hpricot ERROR: While executing gem ... (Gem::FilePermissionError) You don\'t have write permissions into the /opt/ruby-enter
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