Permission denied error while installing gem
I am trying to install rackamole on Windows XP:
S:\development\DevKit>gem install ra开发者_如何学编程ckamole
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: While executing gem ... (Errno::EACCES)
Permission denied - S:/development/Ruby/lib/ruby/gems/1.9.1/gems/rackamole-0.4.0/...
I have checked permission:
S:\development\DevKit>notepad S:\development\Ruby\lib\ruby\gems\1.9.1\gems\rackamole-0.4.0\some.txt
and didn't have any problem.
How can I install gem?
Running the terminal as Administrator
user will solve this problem.
I agree with Vlad Lazarenko comment. You don't need to add your account to the local admin group, just right click the terminal or command prompt and choose "run as administrator" and try again installing the rackamole.
Installing C-extensions on Windows has always been a big and painful problem, as Windows doesn't ship with a compiler. Most gems which are intended to be used on Windows systems publish a specialized gem version with a specific platform field, which then would include pre-compiled binaries. This is not the case for rackamole, otherwise it would be visible here.
Another solution would be to use a version of the gem which uses the newer FFI approach instead of C-extensions to interface with native libraries. I guess this isn't an option here because rackamole, whatever that is, is probably only available with C-extensions.
There once was a Ruby distribution including its own compiler and development headers, but I can't remember the name and I don't know if its still maintained.
Should using Windows not be mandatory, I recommend using a more developer-friendly OS like Ubuntu or Debian in combination with rvm.
精彩评论