Can't install gems (Windows)

J

Jonathan Nielsen

OK, thanks for clarifying that 1.1.6. All I really knew about it was
it was a lot easier than patching 1.1.5 with all the RSTRING_PTRs and
whatever else like I did until I found that :)

-Jonathan Nielsen
 
S

senling

Hi,
I have installed ruby and trying to set rails environment.
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
gem environment
RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
- GEM PATH:
- C:/Ruby/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
gem install rails --include-dependencies
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository

I tried downloading the gem locally , still the same error

gem update --system
Updating RubyGems...
Attempting remote update of rubygems-update
ERROR: While executing gem ... (Gem::InstallError)
rubygems-update requires builder >= 0



I could'nt install any gems.

*** LOCAL GEMS ***

fxri (0.3.6)
fxruby (1.6.12)
hpricot (0.6)
log4r (1.0.5)
rake (0.7.3)
sources (0.0.1)
win32-api (1.0.4)
win32-clipboard (0.4.3)
win32-dir (0.3.2)
win32-eventlog (0.4.6)
win32-file (0.5.4)
win32-file-stat (1.2.7)
win32-process (0.5.3)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.0)
windows-pr (0.7.2)

I would like to know the procedure for setting up the rails
environment.

Thanks in advance
Senling
 
G

Gordon Thiesfeld

[Note: parts of this message were removed to make it a legal post.]

Hi,
I have installed ruby and trying to set rails environment.
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
I would recommend you use the newer rubyinstaller package.

http://rubyinstaller.org/download.html

I would like to know the procedure for setting up the rails
environment.
http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-sqlite3/

or:

http://blog.mmediasys.com/2009/07/06/getting-started-with-rails-and-mysql/

Gordon
 
J

Jason West

I too ran into the same issue with the error message being displayed when installing gems on a new Ruby 1.9.2 (http://www.ruby-lang.org/en/downloads/) installation on the C: drive.

To resolve the issue I simply right-clicked the "Start Command Prompt with Ruby" that was part of the basic install of the Ruby interpreter and selected "Run as Administrator" from the menu.

Hope this helps.

JLW
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 cannot 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:
On Sunday, January 17, 2010 7:24 PM Luis Lavena wrote:
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.
On Sunday, January 17, 2010 10:22 PM 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 `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
//rubyforge.org/frs/?group_id=167[/url])
-- rubyinstaller-1.9.1-p243-rc1.exe
2. Right-click (run as administrator) and execute.
3. Install Directory is Ruby19 and options for add/associate are
checked.

Installation finished

C:\Users\Joel>ruby -v

ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]

C:\Users\Joel>path

PATH=C:\Ruby19\bin;C:\Program Files (x86)\Common Files\Business
Objects\3.0\bin\
NOTES\;C:\Program Files (x86)\Common Files\Business
Objects\3.0\bin\NOTES\DATA\;
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Ruby\bin;C:\mysql;C:\
wamp\bin\mysql\mysql5.1.36\bin;C:\Tcl\bin;C:\zlib;C:\Program Files
(x86)\Git\cmd
;C:\Program Files (x86)\SWiSH
Studio2\burner;C:\Windows\System32\WindowsPowerShe
ll\v1.0\;C:\OpenSSL\;C:\OpenSSL\bin;C:\Program Files
(x86)\Java\jdk1.6.0_14\bin;
C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files
(x86)\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files (x86)\jruby-1.4.0\bin

Note that I use many different versions of Ruby so the new installation
does not remove the old ruby paths still set. This could create issues
later on but for now I am going to leave everything the way it is.

C:\Users\Joel>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.5
- RUBY VERSION: 1.9.1 (2009-07-16 patchlevel 243) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby19/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: C:/Ruby19/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby19/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby19/lib/ruby/gems/1.9.1
- C:/Users/Joel/.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://gems.github.com"]
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com

Note that the sources are already set correctly. If they were not set,
I'd have added github.com manually.

C:\Users\Joel>gem list

*** LOCAL GEMS ***

No gems are listed.

Performing "gem update --system"

Updating RubyGems
Nothing to update

Performing "gem -v"
1.3.5

Okay, so far so good. Everything is fine so far.

(Installation of Gems commencing)

Installing Rails First

C:\Users\Joel>gem install rails
Successfully installed rake-0.8.7
Successfully installed activesupport-2.3.5
Successfully installed activerecord-2.3.5
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.5
Successfully installed actionmailer-2.3.5
Successfully installed activeresource-2.3.5
Successfully installed rails-2.3.5
8 gems installed
Installing ri documentation for rake-0.8.7...
Installing ri documentation for activesupport-2.3.5...
Installing ri documentation for activerecord-2.3.5...
Installing ri documentation for rack-1.0.1...
Installing ri documentation for actionpack-2.3.5...
Installing ri documentation for actionmailer-2.3.5...
Installing ri documentation for activeresource-2.3.5...
Installing ri documentation for rails-2.3.5...
Updating class cache with 0 classes...
On Friday, January 29, 2010 12:53 AM senling wrote:
Hi,
I have installed ruby and trying to set rails environment.

ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

RubyGems Environment:
- VERSION: 0.9.4 (0.9.4)
- INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
- GEM PATH:
- C:/Ruby/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org

ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find rails (> 0) in any repository

I tried downloading the gem locally , still the same error


Updating RubyGems...
Attempting remote update of rubygems-update
ERROR: While executing gem ... (Gem::InstallError)
rubygems-update requires builder >= 0



I could'nt install any gems.


*** LOCAL GEMS ***

fxri (0.3.6)
fxruby (1.6.12)
hpricot (0.6)
log4r (1.0.5)
rake (0.7.3)
sources (0.0.1)
win32-api (1.0.4)
win32-clipboard (0.4.3)
win32-dir (0.3.2)
win32-eventlog (0.4.6)
win32-file (0.5.4)
win32-file-stat (1.2.7)
win32-process (0.5.3)
win32-sapi (0.1.4)
win32-sound (0.4.1)
windows-api (0.2.0)
windows-pr (0.7.2)

I would like to know the procedure for setting up the rails
environment.

Thanks in advance
Senling
 
L

Luis Lavena

I too ran into the same issue with the error message being displayed wheninstalling gems on a new Ruby 1.9.2 (http://www.ruby-lang.org/en/downloads/) installation on the C: drive.

To resolve the issue I simply right-clicked the "Start Command Prompt with Ruby" that was part of the basic install of the Ruby interpreter and selected "Run as Administrator" from the menu.

Hope this helps.

Do not run as administrator unless is needed.

The root of the issue about broken permissions (C: not existing) is
related to Cygwin installation, particularly E editor bundled version.

See our wiki:

http://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#gems_win7
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,744
Latest member
CortneyMcK

Latest Threads

Top