Hello there,

Ruby Version Installed: ruby 1.9.1 (2008-10-28 revision 19983) [i386-mswin32]
Operating Systems: Windows XP (both PC and laptop)

Laptop: I can run a gem command on with no problem
PC: gem won't work despite that ruby works fine. I get this message for any gem command:

% gem -v
C:/ruby1.9/lib/ruby/1.9.1/yaml.rb:9:in `require': no such file to load -- stringio (LoadError)
        from C:/ruby1.9/lib/ruby/1.9.1/yaml.rb:9:in `<top (required)>'
        from C:/ruby1.9/lib/ruby/1.9.1/rubygems/config_file.rb:7:in `require'
        from C:/ruby1.9/lib/ruby/1.9.1/rubygems/config_file.rb:7:in `<top (required)>'
        from C:/ruby1.9/lib/ruby/1.9.1/rubygems/gem_runner.rb:8:in `require'
        from C:/ruby1.9/lib/ruby/1.9.1/rubygems/gem_runner.rb:8:in `<top (required)>'
        from C:/ruby1.9/bin/gem.bat:17:in `require'
        from C:/ruby1.9/bin/gem.bat:17:in `<main>'

It is the exact same installation as on my laptop (where gem works). All the above files are in the installation. Perhaps an environment variable somewhere that has not been set?

I'm at a loss here, I'd *really* appreciate any help or suggestions on how to fix this. I'm hitting my 5th hour here of pulling out my hair.

Thanks in advance,
Michelle

Recommended Answers

All 3 Replies

I forgot to add, I do have RUBYOPTS set.

C:\>echo %RUBYOPT%
rubygems

It looks like your YAML class is corrupted. Try reinstalling ruby: C:/ruby1.9/lib/ruby/1.9.1/yaml.rb:9:in `require': no such file to load -- stringio (LoadError) means that the stringio library is missing, and essential for yaml to run, which is essential for rubygems to run.

Thanks for your reply, ja you're absolutely right.

A few days ago I followed the suggestion of using the RubyInstaller instead of the old mswin32 version from http://rubyinstaller.org/ (NOT th "One-Click Installer)

It works perfectly now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.