问题
I'm trying to run
$gem install eventmachine -v '0.12.10'
because when running
$bundle install
within my rails app, when it gets to eventmachine I get this error:
Installing eventmachine (0.12.10)
Errno::EACCES: Permission denied - /Users/pippinlee/.rvm/gems/ruby-1.9.3-p194/gems/eventmachine-0.12.10/.gitignore
An error occured while installing eventmachine (0.12.10), and Bundler cannot continue.
Make sure that `gem install eventmachine -v '0.12.10'` succeeds before bundling.
I have tried adding gem 'eventmachine', '~> 0.12.10' to Gemfile.
As per these (http://nokogiri.org/tutorials/installing_nokogiri.html) Nokogiri instructions I've installed libxml2, libxslt, libiconv-1.13.1 files with brew.
Using -pre (and corresponding lock in Gemfile) for the install doesn't differ result either.
Running: Lion, Xcode 4.3.2, rvm 1.14.10, ruby 1.9.3p194, rails (3.2.7, 3.2.0)
Thanks in advance.
回答1:
Perhaps the brute-force approach might work:
sudo chown -R pippinlee:staff /Users/pippinlee/.rvm
My guess is you did something, like installing another gem, running as the root user by accident.
来源:https://stackoverflow.com/questions/11751761/eventmachine-gem-permission-denied