简体   繁体   中英

Permission denied error while installing gem

I am trying to install rackamole on Windows XP:

S:\development\DevKit>gem install rackamole
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?

Administrator用户身份运行终端将解决此问题。

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM