Gem error: (Errno::EACCES) Permission denied

I have a problem on Windows 7. I am administrator, and no other accounts
on the system.

I have installed one-click-installer Ruby 1.9, and gem 1.3.5.

When I try to install rails: gem install rails, I get an error. See

Microsoft Windows [Version 6.1.7600]
Copyright © 2009 Microsoft Corporation. Med ensamrätt.

C:\Users\administratör>ruby -v
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

C:\Users\administratör>gem -v

C:\Users\administratör>gem install rails
ERROR: While executing gem … (Errno::EACCES)
Permission denied - C:\Users\administratör/.gem


Any one know how I solve this?

I assume it has to do with the rights but since I am administrator I
should have complete rights…


I found this answer to my problem, at

"I just had the same issue on Vista. When running things via the command
line, you need to run them as administrator even if your account is an
administrative account.

When expecting to install things via the command line, just to goto the
Vista Start Search Edit box, type ‘cmd’ and instead of hitting ‘enter’,
hit cntr+shift+enter to launch it with admin privaliges."

I tried it and it works!


I am using microsoft XP Pro-SP3 and I am facing this problem.

C:\Ruby192>gem install rails --include-dependencies
INFO: gem install -y is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
ERROR: While executing gem … (Errno::EACCES)
Permission denied - C:/Documents and Settings/admin/.gem/specs

Please help to complete with any idea.

i am already an admin in my system?

And I also tried with ctrl+shift+enter … no use. :frowning:

Are you AN admin or are you THE admin? Gem tries to install in a
of the user named admin, if your logged in user is named mahendra and
admin rights that is probably not enough.

Also please check if the directory exists and check the permissions on

Top posted from android

Am 26.02.2011 09:47 schrieb “mahendra Somavarapu R.”
[email protected]:

i am already an admin in my system?

And I also tried with ctrl+shift+enter … no use. :frowning:

Posted via

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at


I am installing canvasLms on Ubuntu .In this installation ruby 1.9.1 and
gem and bundler installation is required .

  1. I was install ruby 1.9.1 it is installed successfully.
    2)After i am installing gem it is installed
    sudo gem install bundler --version 1.3.5 it is installed but when i
    installed with out sudo it shows error : gem error: (Errno::EACCES)
    Permission denied .
  2. when i install #sudo bundle install --path vendor/bundle
    It gives error.

bundler:Gem file not found
please give me what’s a solution .please give me any suggestion

Thanking you