Why doesn't nokogiri install?

不想你离开。 提交于 2019-12-06 11:58:34

You shouldn't need sudo when you do gem install with rbenv. Unfortunately, the ownership is usually not correct for the .rbenv directory on a new install.

Do this first to set your permissions correctly:

sudo chown -R $USER "$HOME/.rbenv"

Then go ahead and just run the install again:

gem install nokogiri -v '1.6.1'

It should work without sudo.

This works fine, but make sure to restart your terminal window after running sudo chown.

sudo chown -R $USER "$HOME/.rbenv" 

# close terminal, then run the gem install

gem install nokogiri 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!