On my Windows 7 installation (fully updated), I can't install any
gems, with both 1.8.7 RC2 and 1.9.1 RC2 versions of rubyinstaller.
Both are installed at C:/Ruby and C:/Ruby19, respectively.
Here is the the debug output when installing e.g. rails:
C:\Users\schreiar.EMEA>gem install rails --debug
Exception `NameError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/
command_man
ager.rb:161 - uninitialized constant Gem::Commands::InstallCommand
Exception `Errno::ENOENT' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- No such file or directory - C:/Users/schreiar.EMEA/.gem/ruby/1.9.1/
cache
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- File exists - C:
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:221
- File exists - C:
Exception `Errno::ENOENT' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- No such file or directory - C:/Users/schreiar.EMEA/.gem/ruby/1.9.1/
doc
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- File exists - C:
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:221
- File exists - C:
Exception `Errno::ENOENT' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- No such file or directory - C:/Users/schreiar.EMEA/.gem/ruby/1.9.1/
gems
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- File exists - C:
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:221
- File exists - C:
Exception `Errno::ENOENT' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- No such
file or directory - C:/Users/schreiar.EMEA/.gem/ruby/1.9.1/
specifications
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- File exists - C:
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:221
- File exists - C:
Exception `Gem::LoadError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/
rubygems.rb:827
- Could not find RubyGem test-unit (>= 0)
Exception `Gem::LoadError' at C:/Ruby19/lib/ruby/site_ruby/1.9.1/
rubygems.rb:827
- Could not find RubyGem sources (> 0.0.1)
Exception `Errno::ENOENT' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- No such file or directory - C:/Users/schreiar.EMEA/.gem/specs/
gems.rubyforge.org%80
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- File exists - C:
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:221
- File exists - C:
Exception `Errno::ENOENT' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- No such file or directory - C:/Users/schreiar.EMEA/.gem/specs/
gems.rubyforge.org%80/quick/Marshal.4.8
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245
- File exists - C:
Exception `Errno::EEXIST' at C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:221
- File exists - C:
ERROR: While executing gem ... (Errno::EEXIST)
File exists - C:
C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245:in `mkdir'
C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:245:in `fu_mkdir'
C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels)
in mkdir_p'
C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:215:in `block in
mkdir_p'
C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:201:in `each'
C:/Ruby19/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
103:in `fetch_spec'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
72:in `block in fetch'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
71:in `map'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
71:in `fetch'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:99:in `find_gems_with_sources'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:192:in `find_spec_by_name_and_version'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:213:in `install'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/commands/
install_command.rb:118:in `block in execute'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/commands/
install_command.rb:115:in `each'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/commands/
install_command.rb:115:in `execute'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:257:in
`invoke'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:
132:in `process_args'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:
102:in `run'
C:/Ruby19/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:
58:in `run'
C:/Ruby19/bin/gem:21:in `<main>'
C:\Users\schreiar.EMEA>
Apparently, the error comes from FileUtils#mkdir_p, specifically these
lines:
stack.reverse_each do |dir|
begin
fu_mkdir dir, options[:mode]
rescue SystemCallError => err
raise unless File.directory?(dir)
end
end
The Errno::EEXIST error gets raised by the fu_mkdir call and then gets
re-raised because File.directory("C:/") returns false, which it should
not, because obviously the directory exists.
Playing around in irb, I found this very weird behaviour:
irb(main):002:0> File.stat("C:")
=> #<File::Stat dev=0x2, ino=0, mode=040755, nlink=1, uid=0, gid=0,
rdev=0x2, si
ze=0, blksize=nil, blocks=nil, atime=2010-03-28 13:42:02 +0100,
mtime=2010-03-28
13:42:02 +0100, ctime=2009-12-17 13:09:59 +0100>
irb(main):003:0> File.stat("C:/")
Errno::EACCES: Permission denied - C:/
from (irb):3:in `stat'
from (irb):3
from C:/Ruby19/bin/irb:12:in `<main>'
irb(main):004:0> File.stat("C:\\")
Errno::EACCES: Permission denied - C:\
from (irb):4:in `stat'
from (irb):4
from C:/Ruby19/bin/irb:12:in `<main>'
irb(main):005:0> File.directory?("C:/")
=> false
irb(main):006:0> File.directory?("C:")
=> true
So the problem is, that I have no permission to access C:/, but I can
access C: perfectly fine. As FileUtils.mkdir_p uses C:/ and not C:,
things break.
Additionally, here is the icacls output for C:/ and C:
C:\Users\schreiar.EMEA>icacls C:\
C:\ BUILTIN\Administrators:(F)
BUILTIN\Administrators:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
BUILTIN\Users:(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(M)
NT AUTHORITY\Authenticated Users:(AD)
Mandatory Label\High Mandatory Level:(OI)(NP)(IO)(NW)
Successfully processed 1 files; Failed processing 0 files
C:\Users\schreiar.EMEA>icacls C:
C: NT AUTHORITY\SYSTEM:(OI)(CI)(F)
BUILTIN\Administrators:(OI)(CI)(F)
EMEA\schreiar:(OI)(CI)(F)
Everyone:(RX)
Successfully processed 1 files; Failed processing 0 files
I'm pretty sure this has worked before, I suspect that some windows
update has borked my permissions. :(
Running gem install with administrator privileges works perfectly fine
and is kind of a workaround for me now.
Any idea what's wrong here?
Questions:
- Did you upgrade from Windows Vista?
- Did you installed Ruby as Administrator or with administrators rights?
If you answer yes to upgrade from Windows Vista, there is a permission
issue over the NTFS that is a problem. Check the group for related
issue.
IF you answer yes to the second question, then is a permission issue
over the folder.
Please take in consideration that icacls will tell you the permissions
you have, but not that if you need elevation to actually use them.
Similar issue was raised in the group, please search for it and let us
know if that helped or not.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
On Sun, Mar 28, 2010 at 2:57 PM, schreibe...@googlemail.com
<schreibe...@googlemail.com> wrote:
> Hello all,
>
> On my Windows 7 installation (fully updated), I can't install any
> gems, with both 1.8.7 RC2 and 1.9.1 RC2 versions of rubyinstaller.
>
> Both are installed at C:/Ruby and C:/Ruby19, respectively.
>
> Here is the the debug output when installing e.g. rails:
>
> [...]
>
> I'm pretty sure this has worked before, I suspect that some windows
> update has borked my permissions. :(
>
> Running gem install with administrator privileges works perfectly fine
> and is kind of a workaround for me now.
>
> Any idea what's wrong here?
>
Questions:
- Did you upgrade from Windows Vista?
- Did you installed Ruby as Administrator or with administrators rights?
If you answer yes to upgrade from Windows Vista, there is a permission
issue over the NTFS that is a problem. Check the group for related
issue.
I'm not seeing the issue or anything related to stat permission issues:
>>
>> Questions:
>>
>> - Did you upgrade from Windows Vista?
>
> Vista -> Win7 RC -> Win7 RTM. This problem only started recently, long after
> the Win7 RTM upgrade.
>
If you didn't format, it might be a leftover incorrect permission in the FS.
Like was here:
http://groups.google.com/group/rubyinstaller/browse_thread/thread/f79c24cbca7bb37b
>>
>> - Did you installed Ruby as Administrator or with administrators rights?
>
> I've tried both the installer and the zip file. Did not run either as
> Administrator. Same issue with both packages.
>
I've run Windows update, I've restart the machine with latest patches,
still no able to reproduce (Windwos 7 x64 Ultimate)
>>
>> If you answer yes to upgrade from Windows Vista, there is a permission
>> issue over the NTFS that is a problem. Check the group for related
>> issue.
>
>
> I'll search around a bit.
Since the problem seems stat, can you "File.stat" some of the Ruby
folders, and include your home and temporary directory?
Would like to know what "gem env" outputs and stat %USERPROFILE%/.gem
or whatever is set in your environment.
No, I'm running a fresh installation of Windows 7 32-bit Enterprise
Edition.
> - Did you installed Ruby as Administrator or with administrators rights?
No, and I also tried both, installer and zip package.
> If you answer yes to upgrade from Windows Vista, there is a permission
> issue over the NTFS that is a problem. Check the group for related
> issue.
>
> IF you answer yes to the second question, then is a permission issue
> over the folder.
>
> Please take in consideration that icacls will tell you the permissions
> you have, but not that if you need elevation to actually use them.
>
> Similar issue was raised in the group, please search for it and let us
> know if that helped or not.
As I said, the same ruby installation was working perfectly fine some
weeks ago, and I can't remember having changed any permissions
manually.
Maybe this problem is only coming up in 32-bit versions of Windows 7,
as you seem to have no problems with your 64-bit installation.
Today I found out that this bug is apparently not ruby specific, but
is appearing in other applications as well! E.g. when I'm browsing for
a specific file in Eclipse (which I do not run with admin privileges),
I can't explore the C: root directory - but I can open any file when
directly specifying it's path!
File.stat works for all kinds of files and folders, both in the Ruby
installation and for different folders on my C: drive, only
File.stat('C:/') is failing with a permission denied folder.
--
Arthur Schreiber
Going to install a clean copy of Windows 7 32bits in a VM and keep you posted.
Apologizes I cannot provide you a workaround to this situation
I'm not seeing the issue or anything related to stat permission issues:
http://gist.github.com/350086
If you didn't format, it might be a leftover incorrect permission in the FS.
Like was here:
http://groups.google.com/group/rubyinstaller/browse_thread/thread/f79c24cbca7bb37b
Since the problem seems stat, can you "File.stat" some of the Ruby
folders, and include your home and temporary directory?
Would like to know what "gem env" outputs and stat %USERPROFILE%/.gem
or whatever is set in your environment.
Ok, I've:
* Installed Windows 7 Ultimate 32bits inside VirtualBox
* Downloaded latest security updates and restarted
* Installed RubyInstaller 1.8.7 RC2 into C:\Ruby187, no PATH modification
* I've installed with success rake:
Doing "gem install rails --debug" right now, and all the RDoc output
is making me dizzy.
Is there something that you recently installed? changed? Driver,
antivirus, anything?
--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To post to this group, send email to rubyin...@googlegroups.com.
To unsubscribe from this group, send email to rubyinstalle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyinstaller?hl=en.
That could mean that Ruby or Ruby folder installation was done under
Administrative rights.
Can you install, with the current UAC level you have and not elevation
into a new folder?
> I swear, I'm about to disable UAC just to get back to a point where things
> work as I would expect.
>
Please don't. My test was done without touching any UAC setting,
meaning was the default one. It worked.
That means something else is in the middle that is not related to UAC
or RubyInstaller.
On my Windows x64 I have UAC in High, meaning it prompts me every time
I do a change on system settings or ProgramFiles / Windows folders.
Meaning: quite rarely, since I don't mess with that (except for
program installation)
Please try a new installation into an non existing folder and try
installing gems in it.
File.stat or File.directory? is not he issue, it might be another
permission thing that is in the middle.
Thank you.
That could mean that Ruby or Ruby folder installation was done under
Administrative rights.
Can you install, with the current UAC level you have and not elevation
into a new folder?
Please try a new installation into an non existing folder and tryinstalling gems in it.
File.stat or File.directory? is not he issue, it might be another
permission thing that is in the middle.
Interesting.
In my latest 32bits testing I tried a clean RTM version of Windows 7,
and before i had a RC of 64bits, never 32bits.
> I /did/ have Win7 RC installed on this machine. Going to see if I can get a
> hold of CleanWin7RCRoot.exe and see if that fixes the issue. Would hate to
> have to repave this machine...
Since you updated from Beta to RC and then RTM, that means that the
permission issue might come along with you.
Well, please take a look to the workaround, that will fix the C:\ and
from there, you can go to Ruby187 folder and make it reuse the
inherited permissions.
Try the manual path as the tool will not install if is not RC version.
Please keep us posted.
A simple workaround is to start a cmd.exe window with Run as
administrator and run the gem commands from that window. (Just like
Mac and Linux users do "sudo gem").
~Johannes
On Mar 28, 2:57 pm, "schreiber.art...@googlemail.com"
Thank you Johannes for your answer.
However, that is far from ideal.
If you installed Ruby without Admin permissions, you should be able to
install gems without them too.
Please see the other responses on this and specially Will Green findings:
http://groups.google.com/group/rubyinstaller/msg/f9cbd4312d49cdf3
Since you updated from Beta to RC and then RTM, that means that thepermission issue might come along with you.
Well, please take a look to the workaround, that will fix the C:\ and
from there, you can go to Ruby187 folder and make it reuse the
inherited permissions.
Try the manual path as the tool will not install if is not RC version.
Can you try something one last time?
Applied the cacls trick, remove completely Ruby187 (uninstall and
delete folder) and install it again.
Then, try gem installation.
If doesn't work, I've completely exhausted my knowledge and tools to
avoid you reinstallation.
Sorry.
t:\Media\Samurai7>gem list
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
t:\Media\Samurai7>gem uninstall rake
Remove executables:
rake
in addition to the gem? [Yn]
Removing rake
You have requested to uninstall the gem:
rake-0.8.7
rails-2.3.5 depends on [rake (>= 0.8.3)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]
Successfully uninstalled rake-0.8.7
t:\Media\Samurai7>gem install rake --debug
Exception `NameError' at Q:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/
command_manager.rb:161 - uninitialized constant Gem::
Commands::InstallCommand
Exception `Gem::LoadError' at Q:/ruby/lib/ruby/site_ruby/1.9.1/
rubygems.rb:827 - Could not find RubyGem test-unit (>= 0)
Exception `Gem::LoadError' at Q:/ruby/lib/ruby/site_ruby/1.9.1/
rubygems.rb:827 - Could not find RubyGem sources (> 0.0.1
)
Exception `NoMethodError' at Q:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/
package/tar_input.rb:48 - undefined method `readp
artial' for #<Gem::Package::TarReader::Entry:0x1b92a20>
Exception `IOError' at Q:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/
format.rb:50 - closed stream
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems/1.9.1
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems/1.9.1/gems/ra
ke-0.8.7
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems/1.9.1/gems/ra
ke-0.8.7
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems/1.9.1/gems/ra
ke-0.8.7
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems/1.9.1/gems/ra
ke-0.8.7
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems/1.9.1/gems/ra
ke-0.8.7
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems/1.9.1/gems/ra
ke-0.8.7
Exception `Errno::ENOENT' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
No such file or directory - Q:/ruby/lib/ruby/gems
/1.9.1/gems/rake-0.8.7/lib/rake
Exception `Errno::EACCES' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
Permission denied - Q:
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - Q:/ruby/lib/ruby/gems
And so on ...............................
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - classes/Test
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - classes/Test/Unit
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - classes/Test/Unit/Collector
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - classes
Exception `Errno::EEXIST' at Q:/ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exists - classes
t:\Media\Samurai7>gem list
*** LOCAL GEMS ***
actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)
t:\Media\Samurai7>
So, there are lots of EEXIST errors, but the gem is installed OK. My
best guess is that it is a --debug issue.
It is normal see a lot of Errno:EEXIST raised by fileutils
> So, there are lots of EEXIST errors, but the gem is installed OK. My
> best guess is that it is a --debug issue.
RubyGems is catching them and showing in the output, but is safe to
assume is not a problem.
The problem is in the cases where RubyGem IS NOT catching the
exception, and that is when things fail, like happen to you and Will.
It is beyond my expertise deal with NTFS ACLs. Please accept my
apologies for the issues you're experiencing.
Can you try something one last time?
Applied the cacls trick, remove completely Ruby187 (uninstall and
delete folder) and install it again.
Then, try gem installation.
If doesn't work, I've completely exhausted my knowledge and tools to
avoid you reinstallation.
Sorry.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
Rubygems catches the Errno::EEXIST error, then tests whether the C:/
directory exists, which returns false (because of the missing
permissions) and causes Rubygems to re-raise the Errno::EEXIST error,
causing the gem install command to fail.
This is _not_ a ruby specific issue, (at least on my machine) I see
this issue with other software applications too (e.g. Eclipse and Git
expose all kinds of weird permission problems, but e texteditor does
not), when they try to access the C:/ root folder directly!
I'm running a clean Win7 32-bit install, so it's not an upgrade issue,
either.
Other software I have installed is Cygwin, not sure whether that has
broken my permissions.
Did you formatted your harddrive? I mean, is a real clean install?
> Other software I have installed is Cygwin, not sure whether that has
> broken my permissions.
>
I don't think so, but since I cannot replicate is even more harder to
find the root of the problem.
On 8 abr, 12:52, Luis Lavena <luislav...@gmail.com> wrote:
> On Thu, Apr 8, 2010 at 3:39 AM, schreiber.art...@googlemail.com
Can you remove all the dot files form your HOME (%USERPROFILE%) folder?
Also, do gem installation outside cygwin bash prompt, never inside.
Please let us know
2010/4/16 Javier Martínez Fernández <ecent...@gmail.com>:
> Removing all dot files (including folders) and using a cmd window...How did you installed RubyInstaller? as administrator?
> same problem!
>
> Any more ideas?
>
Can you try installing without elevation of user into a different
folder? Previously on this thread there is a link to a Microsoft KB
article that might contain a fix, can you check that?
On Fri, Apr 16, 2010 at 11:07 AM, Javier Martinez FernandezPlease scroll down to the manual instruction details.
<ecent...@gmail.com> wrote:
> Ruby was installed with a normal account.
> Cygwin is not in the system path.
> The microsoft fix is for english rc windows version. I'm now in a
> final windows ultimate 32b version.
>
> If it helps, I installed "rubyinstaller-1.9.1-p378-rc2.exe"
>
It is weird that all the reports are coming from 7 ultimate in 32 bits mode.
Might I ask if those are legal copies?
I've tried to replicate on a
clean installation, using ultimate 32bits and couldn't reproduce.
It might be something interfering.
Can you please provide us the following in a pastie/gist:
SET PATH
SET GEM
gem env
Thank you.
--
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry
--
You received this message because you are subscribed to the Google Groups "RubyInstaller" group.
To post to this group, send email to rubyin...@googlegroups.com.
To unsubscribe from this group, send email to rubyinstalle...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyinstaller?hl=en.
File Exist error? are you running an editor that is locking the Ruby folder?
We hard of a problem with NTFS before:
http://wiki.github.com/oneclick/rubyinstaller/troubleshooting#gems_win7
It might be that your NTFS is coming from a Windows Vista
installation? the permissions might be wrong.
Also, if you installed Ruby as administrator, then a normal command
prompt do not have permission to write over the existing files.
Did you upgrade from RC or Vista?
Did you try to install to a different folder and without administrative rights?
What are you using as command prompt?
A clean install of Windows, or a formatted hard drive? The issue with
permissions seems to be related to NTFS, not Windows itself.
I've tried to recreate the issue 3 times (using clean installations on
VMs) and all worked.
What we could be missing here? Perhaps we should minimize the case to
a simple C code that tries to create a file/folder?
Which file is it referring to?
That's the think, tries to create ANY file inside C:
Is not C: the one tries to create, but all the other inside (see
FileUtils.mkdir_p)
> I had considered it might be something to do with Cygwin. I've
> installed E Text Editor, which also installs Cygwin by default. It's
> not in the path, though, and is all safely contained in its c:\cygwin
> folder, so I don't see how it can be affecting things elsewhere.
Thinking about it, you can test for this quite easily. Just install
the E Text Editor trial, run it and let it install Cygwin using the
'automatic' setting. I could have sworn I installed a couple of gems
before I installed e, but I can't be positive whether I was in an
elevated console when I installed them. I notice a couple of other
people suffering from this have also mentioned Cygwin. Could it be
changing permissions when it installs? This is what I get when I do
icacls on C:\
[C:\]icacls \
\ BUILTIN\Administrators:(F)
BUILTIN\Administrators:(OI)(CI)(IO)(F)
NT AUTHORITY\SYSTEM:(F)
NT AUTHORITY\SYSTEM:(OI)(CI)(IO)(F)
BUILTIN\Users:(OI)(CI)(RX)
NT AUTHORITY\Authenticated Users:(OI)(CI)(IO)(M)
NT AUTHORITY\Authenticated Users:(AD)
Mandatory Label\High Mandatory Level:(OI)(NP)(IO)(NW)
According to the MS article, this looks correct.
Charles
[C:\Users\charlesr]gem install rake
ERROR: While executing gem ... (Errno::ENOENT)
No such file or directory -
C:/Users/charlesr/.gem/ruby/1.9.1/cache/rake-0.8.7.gem
Charles
I assume the file exists? If you do an exists and read from it within
irb does it work?
-r
No, it didn't exists. I did a gem sources -c and that seemed to 'fix'
things to the point where it's now giving me the same error as 1.8.7:
Charles
BINGO!
We have a winner!
C:\Users\Luis>ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]
C:\Users\Luis>gem install rake
ERROR: While executing gem ... (Errno::EEXIST)
File exists - C:
This happens after installing E with cygwin.
E is in the PATH, let me look any file dumped by cygwin.
C:\Users\Luis>path
PATH=C:\Users\Luis\.gem\ruby\x86-mingw32\1.8\bin;C:\Users\Luis\Tools\Ruby\ruby-1.8.7-p299-i386-mingw32\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\e\cmd;C:\Users\Luis\Tools\bin;C:\Users\Luis\Tools\Git\cmd;C:\Users\Luis\Tools\Svn\bin;C:\Users\Luis\Tools\Hg;C:\Users\Luis\Tools\Unix\bin;C:\Users\Luis\Tools\Vim;C:\Program
Files (x86)\Java\jdk1.6.0_18\bin
....
More to come.
Check this out:
irb(main):001:0> require 'fileutils'
=> true
irb(main):002:0> p =
"C:/Users/Luis/.gem/ruby/x86-mingw32/1.8/gems/rake-0.8.7/lib/rake"
=> "C:/Users/Luis/.gem/ruby/x86-mingw32/1.8/gems/rake-0.8.7/lib/rake"
irb(main):003:0> FileUtils.mkdir_p p
Errno::EEXIST: File exists - C:
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`fu_mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:217:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`reverse_each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`mkdir_p'
from (irb):3
But:
irb(main):004:0> FileUtils.mkdir_p "C:/Foo"
=> "C:/Foo"
And:
irb(main):005:0> FileUtils.mkdir_p "C:/Foo/Bar/baz"
Errno::EEXIST: File exists - C:
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`fu_mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:217:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`reverse_each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`mkdir_p'
from (irb):5
Uninstalling E and cygwin now...
That didn't help, better information here:
https://gist.github.com/047915f46a88eb11dfcb
And simple step to reproduce the issue, a recursive directory:
irb(main):001:0> require 'fileutils'
=> true
irb(main):002:0> FileUtils.mkdir_p "C:/Foo/bar/baz"
Errno::EEXIST: File exists - C:
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`fu_mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:217:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`reverse_each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`mkdir_p'
from (irb):2
Something got changed in C: that is making FileUtils fail, and is not
permissions.
I swear, last email:
irb(main):006:0> FileUtils.mkdir_p "C:\\1\\2\\3"
Errno::EEXIST: File exists - C:\
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:243:in
`fu_mkdir'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:217:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`reverse_each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:215:in
`mkdir_p'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`each'
from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p299-i386-mingw32/lib/ruby/1.8/fileutils.rb:201:in
`mkdir_p'
from (irb):6
irb(main):007:0> File.stat("C:/")
Errno::EACCES: Permission denied - C:/
from (irb):7:in `stat'
from (irb):7
irb(main):008:0> File.stat("C:/Foo")
=> #<File::Stat dev=0x2, ino=0, mode=040755, nlink=1, uid=0, gid=0,
rdev=0x2, size=0, blksize=nil, blocks=nil, atime=Wed Dec 31 21:00:00
-0300 1969, mtime=Wed Dec 31 21:00:00 -0300 1969, ctime=Wed Dec 31
21:00:00 -0300 1969>
irb(main):009:0> File.stat("C:/1")
Errno::ENOENT: No such file or directory - C:/1
from (irb):9:in `stat'
from (irb):9
irb(main):010:0> File.exist?("C:\\")
=> false
irb(main):011:0> File.exist?("C:/")
=> false
Any hint?
My brain is burnt from a hell of week I had, so don't expect me find
the root of this today :-P
I lied, last, really last email.
Issue seems to be RubyGems. RubyGems uses HOME, USERPROFILE or
HOMEDRIVE + HOMEPATH for setting Gem.user_home directory.
The problem with that is the following:
require 'fileutils'
FileUtils.mkdir_p "C:\\Foo\\Bar" # this fails
FileUtils.mkdir_p "C:/Foo/Bar" # this too, but for different reasons,
keep reading.
fu_mkdir is changing path locally but then, on SystemCallError rescue,
is been checked against the non modified version.
So:
"C:/" is feed into fu_mkdir
"C:/" is sanitized to "C:"
Dir.mkdir is tried with "C:" and fails
Exception is rescued and raised unless "C:/" is a directory already.
C:/ is not a directory:
irb(main):001:0> File.directory?("C:/") # => false
C: *is* a directory:
irb(main):003:0> File.directory?("C:")
=> true
So, two fixes here:
RubyGems should expand all the defined homes. Creating a ticket for that.
FileUtils minimal change:
from:
path = path.sub(%r</\z>, '')
to:
path.sub!(%r</\z>, '')
Dunno the real source of these errors, but I think I found what could
be the issue.
Thoughts?
If I add my own user with full control permissions, I can install gems
again. Could someone who has a working system let us know what the
default permissions are on VirtualStore?
Charles
Is e-editor changing that? That is plain wrong!
That could be the problem with File.stat('C:/') as WOW64 redirection
is working for 32bits applications...
> http://gist.github.com/471087
>
> Is e-editor changing that? That is plain wrong!
Either e or Cygwin - not sure. I'll contact e's author and let him
know this is happening. Are you able to test installing Cygwin
normally, without installing e?
> That could be the problem with File.stat('C:/') as WOW64 redirection
> is working for 32bits applications...
Looks like anything that touches C:\ makes Windows Virtualization
kick-in which then fails because the permissions on VirtualStore got
broken during e install.
Charles
I had a working cygwin before, so is not that. Also e do not install
cygwin in C:\ but inside it's program files folder.
Found this:
http://support.microsoft.com/kb/927387
And after showing all files, went to %LOCALAPPDATA%, Right click in
VirtualStore, Security settings and then in advanced selected to
inherit the permissions from the parent object.
Click ok and things started to work again:
C:\Users\Luis\Projects\oss\ruby>ruby -e "puts File.stat('C:/')"
#<File::Stat:0x43c5e70>
Either was cygwin or e, but I'm sticking with SublimeText...
Added a small note to the wiki:
http://wiki.github.com/oneclick/rubyinstaller/troubleshooting#gems_win7
chmod o-w `cygpath $HOMEDRIVE`
Apparently when cygwin sets permissions, it makes a mess of the ACL
permissions.
There's also a thread on the E forum about it:
http://www.e-texteditor.com/forum/viewtopic.php?t=3715
Charles
Victor, have you tried setting the environment variables as instructed
several messages back?
What does HOME, HOMEDRIVE, HOMEPATH, USERPROFILE variable say?
E.g., on my system:
C:\Users\Luis>set HOMEDRIVE
HOMEDRIVE=C:
What the other variables says in yours?
What "gem env" outputs?