From: Sal on
I am unable to install any gems now on my Windows 7 machine running
Ruby 1.9.1. Earlier today I was updating a gem and it failed. Since
then, I can't install or update ANY gems. I tried un/reinstalling ruby
with no luck. The error is:

ERROR: While executing gem... (Errno(EEXIST)
File exists - C:
From: Luis Lavena on
On Jan 17, 7:27 pm, Sal <salbass...(a)hotmail.com> wrote:
> I am unable to install any gems now on my Windows 7 machine running
> Ruby 1.9.1. Earlier today I was updating a gem and it failed. Since
> then, I can't install or update ANY gems. I tried un/reinstalling ruby
> with no luck. The error is:
>
> ERROR: While executing gem... (Errno(EEXIST)
> File exists - C:

Please, provide more information about your ruby installation and the
version of RubyGems being used.

('gem env' will provide all that information)

Also, provide the complete output of the gem installation command with
debug and verbose mode turned on:

gem install foobar --debug -V

Paste the complete output.

Help us help you.

--
Luis Lavena
From: Alpha Blue on
I don't think you should be using 1.9.1 on windows to begin with. I'm a
windows system admin and it's very difficult to begin to understand how
to build 1.9.1 from binaries. A lot of people, especially good people
like Luis and Roger have gone out of their way to work on a package that
is built around MinGW. For windows installations we're pretty much
stuck with either a MinGW or cygwin.

First, Luis is correct that you need to supply all of the information
for your current ruby setup.

Personally, I would not use 1.9.1. A lot of people make the mistake in
wanting to use the latest and greatest and after awhile they realize the
difficulties with trying to find gems that are compiled not only for
their ruby environment but gems that include OS dependencies. With
1.9.1 you need to install gems based on those dependency checks.

So, you have a few options you should consider here.

If you are hell bent on developing with windows, then go to the 1.8.6
one-click installer, or move to netbeans 6.8 and jruby. You can't use
Ruby EE (enterprise edition) on a windows environment so that's not a
good option. While you could go with a 1.8.7 setup, you are probably
going to run into similar compiler issues, especially with windows 7.
And, if you are trying to use 64-bit, this is a whole other headache in
itself.

So, outlining your options here if you are bent on developing on
windows:

1.8.6 - One Click Installer (no headaches)
JRuby 1.4 - use Netbeans 6.8 IDE ( very few headaches)

OR, you can do the following:

Install VMWare or Virtualbox, create a linux distro for either CentOS
5.4 OR Ubuntu 9.x, and follow numerous threads for getting your
development going.

My setup is as follows:

I develop on Windows and on Linux (CentOS and Ubuntu). On Windows I
have Ruby 1.8.6, Ruby 1.9.1(ming..), Jruby 1.2 and 1.4. On my vmware I
run two distros (centos and ubuntu) and both of those distros use Ruby
EE (which is very fast and stable version 1.8.7) I also use netbeans
6.8 on linux and it runs fine after you set it up properly.

I know this might be a lot of information to take in, but I can think of
about 5 things off the top of my head and I bet Luis can to, on what has
gone wrong with your environment.

I'm willing to help you out if you need it.

--
Posted via http://www.ruby-forum.com/.

From: Sal on
I am using the latest ruby 1.9.1 windows installer.

gem env yields:

RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [i386-mingw32]
- INSTALLATION DIRECTORY: c:/Ruby/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: c:/Ruby/bin/ruby.exe
- EXECUTABLE DIRECTORY: c:/Ruby/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- c:/Ruby/lib/ruby/gems/1.9.1
- C:/Users/Matt/.gem/ruby/1.9.1
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://
gemcutter.org"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gemcutter.org

Any gem install fails, but for example here is the attempt to install
rails:

Exception `NameError' at c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/
command_manag
er.rb:161 - uninitialized constant Gem::Commands::InstallCommand
Exception `Gem::LoadError' at c:/Ruby/lib/ruby/site_ruby/1.9.1/
rubygems.rb:827 -
Could not find RubyGem test-unit (>= 0)

Exception `Errno::EEXIST' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exis
ts - C:/Users/Matt/.gem/specs/gems.rubyforge.org%80
Exception `Errno::EEXIST' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exis
ts - C:/Users/Matt/.gem/specs/gemcutter.org%80
Exception `Errno::ENOENT' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 -
No such f
ile or directory - C:/Users/Matt/.gem/specs/gemcutter.org%80/quick/
Marshal.4.8
Exception `Errno::EEXIST' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243 -
File exis
ts - C:
Exception `Errno::EEXIST' at c:/Ruby/lib/ruby/1.9.1/fileutils.rb:219 -
File exis
ts - C:
ERROR: While executing gem ... (Errno::EEXIST)
File exists - C:
c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243:in `mkdir'
c:/Ruby/lib/ruby/1.9.1/fileutils.rb:243:in `fu_mkdir'
c:/Ruby/lib/ruby/1.9.1/fileutils.rb:217:in `block (2 levels)
in mkdir_p'

c:/Ruby/lib/ruby/1.9.1/fileutils.rb:215:in `reverse_each'
c:/Ruby/lib/ruby/1.9.1/fileutils.rb:215:in `block in mkdir_p'
c:/Ruby/lib/ruby/1.9.1/fileutils.rb:201:in `each'
c:/Ruby/lib/ruby/1.9.1/fileutils.rb:201:in `mkdir_p'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
103:in `fetch_
spec'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
72:in `block i
n fetch'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
71:in `map'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/spec_fetcher.rb:
71:in `fetch'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:99:in
`find_gems_with_sources'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:192:in
`find_spec_by_name_and_version'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/
dependency_installer.rb:213:in
`install'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/commands/
install_command.rb:11
8:in `block in execute'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/commands/
install_command.rb:11
5:in `each'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/commands/
install_command.rb:11
5:in `execute'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/command.rb:257:in
`invoke'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:
132:in `pro
cess_args'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:
102:in `run
'
c:/Ruby/lib/ruby/site_ruby/1.9.1/rubygems/gem_runner.rb:58:in
`run'
c:/Ruby/bin/gem:21:in `<main>'

Thank you guys so much. I appreciate nay assistance you can provide me!
From: Alpha Blue on
1. Where did you build your 1.9.1 binaries from?

Did you use this one?

http://github.com/oneclick/rubyinstaller

2. Add http://gems.github.com to your gem sources

3. Run gem update.

4. Run gem list and post your gems.

--
Posted via http://www.ruby-forum.com/.