I had the same problem, and tried a lot of different variants. After some tries I became able to sudo gem install
, but still have problem to install it without sudo.
Finally I found a decission - reinstalling of rvm helped me. Probably it can save time somebody else.