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
.