Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby gem LoadError - rubygems/defaults/operating_system

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/fluffy/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://gems.rubyforge.org/ 
like image 571
Fluffy Avatar asked Jun 20 '09 08:06

Fluffy


People also ask

What is RubyGems in Ruby programming language?

RubyGems is a package manager for the Ruby programming language that provides a standard format for distributing Ruby programs and libraries (in a self-contained format called a "gem"), a tool designed to easily manage the installation of gems, and a server for distributing them.

Does RubyGems come with Ruby?

Ruby comes with RubyGems by default since version 1.9, previous Ruby versions require RubyGems to be installed by hand.

What is RubyGems used for?

The RubyGems software allows you to easily download, install, and use ruby software packages on your system. The software package is called a “gem” which contains a packaged Ruby application or library. Gems can be used to extend or modify functionality in Ruby applications.

What is require RubyGems?

require 'rubygems' will adjust the Ruby loadpath allowing you to successfully require the gems you installed through rubygems, without getting a LoadError: no such file to load -- sinatra . From the rubygems-1.3.


1 Answers

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

like image 114
Andrew Grimm Avatar answered Sep 28 '22 01:09

Andrew Grimm