gem install rails ERROR: While executing gem … (Errno::EACCES)

前端 未结 3 776
暗喜
暗喜 2021-01-12 09:47

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

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-12 10:08

    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.

提交回复
热议问题