From: Luis Lavena Date: 2010-01-18T12:45:05+09:00 Subject: Re: Can't install gems (Windows) On Jan 18, 12:22 am, Sal wrote: > 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 `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: > > [...] > Thank you guys so much. I appreciate nay assistance you can provide me! Please change directory into one of the gem installation directories: cd c:/Ruby/lib/ruby/gems/1.9.1 And try yo create a file there: ruby -rfileutils -e "FileUtils.touch 'foobar'" Repeat the same process with the second directory shown by gem env (C:/ Users/Matt/.gem/ruby/1.9.1) If you or Ruby cannot write to these directories, it will fail. If you installed Ruby with administrative privileges and you're not a member of Administrator group, then you're hitting a permission issue. I would recommend setting GEM_HOME and GEM_PATH environment variables to a different place (one that you have control) and try installation again. Also, please remove gemcutter from your gem sources: gem sources -r http://gemcutter.org As Gemcutter is now gems.rubyforge.org -- Luis Lavena