views:

1439

answers:

5

I get the following error when attempting to install RubyGems. I've tried Googling but have had no luck there. Has anybody encountered and resolved this issue before?


C:\rubygems-1.3.0> ruby setup.rb
.
.
install -c -m 0644 rubygems/validator.rb C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/validator.rb
install -c -m 0644 rubygems/version.rb C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/version.rb
install -c -m 0644 rubygems/version_option.rb C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/version_option.rb
install -c -m 0644 rubygems.rb C:/Ruby/lib/ruby/site_ruby/1.8/rubygems.rb
install -c -m 0644 ubygems.rb C:/Ruby/lib/ruby/site_ruby/1.8/ubygems.rb
cp gem C:/Users/brian/AppData/Local/Temp/gem
install -c -m 0755 C:/Users/brian/AppData/Local/Temp/gem C:/Ruby/bin/gem
rm C:/Users/brian/AppData/Local/Temp/gem
install -c -m 0755 C:/Users/brian/AppData/Local/Temp/gem.bat C:/Ruby/bin/gem.bat
rm C:/Users/brian/AppData/Local/Temp/gem.bat
Removing old RubyGems RDoc and ri
Installing rubygems-1.3.0 ri into C:/Ruby/lib/ruby/gems/1.8/doc/rubygems-1.3.0/ri
./lib/rubygems.rb:713:in `set_paths': undefined method `uid' for nil:NilClass (NoMethodError)
        from ./lib/rubygems.rb:711:in `each'
        from ./lib/rubygems.rb:711:in `set_paths'
        from ./lib/rubygems.rb:518:in `path'
        from ./lib/rubygems/source_index.rb:66:in `installed_spec_directories'
        from ./lib/rubygems/source_index.rb:56:in `from_installed_gems'
        from ./lib/rubygems.rb:726:in `source_index'
        from ./lib/rubygems.rb:138:in `activate'
        from ./lib/rubygems.rb:49:in `gem'
        from setup.rb:279:in `run_rdoc'
        from setup.rb:296

C:\rubygems-1.3.0>

I have Ruby 1.8.6 installed on my laptop running Windows Vista.

Thanks in advance, Brian

+2  A: 

I assume you're not trying to install under cygwin; that install is meant for unix-like operating systems. Edit: (Actually, from the log above it looks like there is some Windows-specific stuff being run... perhaps you're running into a UAC protection issue?)

If you just use the Windows ruby one-click installer, it includes rubygems. If you're not getting the rubygems functionality, you may need to require "rubygems" in your script, or add -rubygems to your RUBYOPT environment variable. (You can also require rubygems from the command line with ruby -rubygems myscript.rb.

Are you trying to install it separately for some other reason?

JasonTrue
I was trying to install Ruby on Rails following their instructions which does it as two separate steps. I am completely new to this and don't even know enough to be dangerous yet.
bmatthews68
can you run "irb" and try `require 'rubygems'` to verify if you've already got rubygems?
JasonTrue
The actual command inside irb would be:require 'rubygems'If it's available, you'll get "true" (if it hadn't been loaded previously) or "false" if rubygems was loaded in the same session. You'll get "LoadError" if it's not available.
JasonTrue
I re-installed and checked the box for gems. All is well. Thanks
bmatthews68
A: 

I have rubygems 1.2.0 installed on Vista and it works fine. I have no tested rubygems 1.3.0 yet.

hectorsq
A: 

I found the same error with rubygems 1.3 on Vista. I downgraded to 1.2 and it seems to have fixed it

A: 

camt get 1.3 to compile on XP, its just a garbage release

A: 

I can confirm also, rubygems 1.3.0 on windows for some strange reason doesn't work at all.

Downgrade, by re-installing 1.2.0 on top of the 1.3.0.

Hik