I somehow messed my $PATH up. (changed it) and my ruby and rails gems weren\'t working. What I did in efforts to fix this was to reinstall RVM. Now my ruby works fine in the
I had this problem in Ubuntu, but it was because I didn't installed the rvm with "Run command as a login shell", after the installation of rvm they told about this, and the link to look for the information to enable in ubuntu. Here's the link: https://rvm.io/integration/gnome-terminal
For RVM to work properly, you have to check the 'Run command as login shell' checkbox on the Title and Command tab of gnome-terminal's Edit ▸ Profile Preferences menu dialog, in case the menu is missing right click the terminal app and navigate Profiles ▸ Profile Preferences.
I'm running 10.8.5 OSX and was trying to install Rails with Ruby 1.9.3-p448 - so I don't know if it's exactly the same problem, but by looking in the mkmf.rb code where it failed, I found that the problem was that the basic CC command wasn't running. For some reason, it needed to search for the folders in /usr/local, and for some reason, /usr/local was set to 740 permissions on my install (which I had gotten from someone else so not sure what he had done prior to my getting the machine.)
So after I did chmod +x /usr/local
, everything worked ok.
Like Dave pointed out up there, there should be no need to sudo any Gem installation. You could try to reset the permissions on your RVM directory:
sudo chown -R emKaro: ~/.rvm/
and try your Gem instllation again. If that doesn't work out, you should consider removing your RVM installation and start over:
sudo rm -rf ~/.rvm/ # remove your RVM directory
There should really be no need for using sudo in any of this.