ERROR: While executing gem … (Gem::FilePermissionError)

I have checked all the other similar answers and none was exactly like mine, neither did any of those solutions work for me. gem environment and sudo gem environment give the same result: rvm -v : rvm 1.22.3 ruby -v : ruby 1.8.7 OSX 10.8.4 echo $PATH /usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/ava/.rvm/bin:/home/ava/bin gem install <gem-name> gives whereas I am … Read more

Unable to install gem – Failed to build gem native extension – cannot load such file — mkmf (LoadError)

There are similar questions: `require’: no such file to load — mkmf (LoadError) Failed to build gem native extension (mkmf (LoadError)) – Ubuntu 12.04 Usually, the solution is: sudo apt-get install ruby-dev Or, if that doesn’t work, depending on your ruby version, run something like: sudo apt-get install ruby1.9.1-dev Should fix your problem. Still not … Read more