views:

1431

answers:

4

Hello, I've installed ruby 1.8.6 p368 and gems 1.3.4 as well as required libraries like zlib, ssl or readline on my winxp sp3 box. The problem is, when I now try to use some gem, I get the following error:

Exception `LoadError' at D:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:1112 - no su
ch file to load -- rubygems/defaults/operating_system
Exception `LoadError' at D:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.
rb:31 - no such file to load -- mysql

Seems like it makes sense to start with fixing the missing "rubygems/defaults/operating_system" file. How can I do that? TIA

PS: gem env is

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.4
  - RUBY VERSION: 1.8.6 (2009-03-31 patchlevel 368) [i386-mswin32]
  - INSTALLATION DIRECTORY: D:/ruby/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: D:/ruby/bin/ruby.exe
  - EXECUTABLE DIRECTORY: D:/ruby/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-mswin32-60
  - GEM PATHS:
 - D:/ruby/lib/ruby/gems/1.8
 - C:/Documents and Settings/roddik/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/
A: 

It looks like you need the mysql gem too.

mlambie
here is what gem list shows*** LOCAL GEMS ***mechanize (0.9.3)mysql (2.7.3)nokogiri (1.3.1)
roddik
A: 

The following error

Exception 'LoadError' at D:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:1112 - no such file to load -- rubygems/defaults/operating_system

Can relate to either

  1. a corrupt installation (check the rubygems.rb file and make sure it requires 'rubygems/defaults/operating_system'. If it does, check to see if it exists) or
  2. you're trying to run a 2.3.x app while the server is still configured to using Rails 2.1.x

I hope this helps. If not, let me know.

Barry Gallagher
1. rubygems.rb really requires that file, but the file doesn't exist, I've found out that requing that file was introduced in gems 1.2.0, though the manual states "if that file exists". I've installed ruby by unpacking zip file I got from ftp.ruby-lang.org2. I'm not trying to run rails app, in fact rails gem isn't installed at all
roddik
A: 

Have you tried InstantRails? It has rails/apache/mysql in a nice package and worked out of the box on every XP box I tried.

I also install NetBeans as dev environment and just point it to InstantRails "bin/ruby" binary.

Zepplock
+2  A: 

Were you running using -d? If so, this email reckons that it's displaying exceptions even when they're rescued.

Andrew Grimm