# Can't use gems

**URL:** <https://www.ruby-forum.com/t/cant-use-gems/170652>\
**Category:** Ruby\
**Created:** [June 20, 2009, 10:42am UTC](https://www.ruby-forum.com/t/cant-use-gems/170652 "2009-06-20T10:42:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![roddik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@roddik](https://www.ruby-forum.com/u/roddik)\
**Post date:** [June 20, 2009, 10:42am UTC](https://www.ruby-forum.com/t/cant-use-gems/170652/1 "2009-06-20T10:42:43Z")

</div>

Hello, I have the following ruby config on my winxp sp3 box

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/](http://gems.rubyforge.org/)

and the following gems are installed

D:\>gem list

\*\*\* LOCAL GEMS \*\*\*

mechanize (0.9.3)  
mysql (2.7.3)  
nokogiri (1.3.1)

However when I try to use them, I get

D:\>ruby -d ./test.rb  
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 Exception `LoadError’ at  
D:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.  
rb:31 - no such file to load – mechanize  
./test.rb:5: [BUG] Segmentation fault

How can I fix it? TIA

By the way, if anyone who can change the situation here, the latest  
one-click installer of ruby available so far ships with very old  
patchlevel, which is sad…

---

<div class="post-metadata">

**Author:** ![roddik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@roddik](https://www.ruby-forum.com/u/roddik)\
**Post date:** [June 20, 2009, 11:03am UTC](https://www.ruby-forum.com/t/cant-use-gems/170652/2 "2009-06-20T11:03:11Z")

</div>

On Sat, Jun 20, 2009 at 9:42 AM, Rod D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> - x86-mswin32-60  
> - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)
> 
> D:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.  
> rb:31 - no such file to load – mechanize  
> ./test.rb:5: [BUG] Segmentation fault
> 
> How can I fix it? TIA
> 
> By the way, if anyone who can change the situation here, the latest  
> one-click installer of ruby available so far ships with very old  
> patchlevel, which is sad…

Hi,

There is a bug in either mechanize or mysql (I’m not sure which) that  
when required together, cause a segfault. There was another post on  
this list regarding the exact same issue a day or so ago. Might be  
worth looking that up.

Rgds,  
Ben

---

<div class="post-metadata">

**Author:** ![roddik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@roddik](https://www.ruby-forum.com/u/roddik)\
**Post date:** [June 20, 2009, 11:05am UTC](https://www.ruby-forum.com/t/cant-use-gems/170652/3 "2009-06-20T11:05:35Z")

</div>

Ben L. wrote:

> Hi,
> 
> There is a bug in either mechanize or mysql (I’m not sure which) that  
> when required together, cause a segfault. There was another post on  
> this list regarding the exact same issue a day or so ago. Might be  
> worth looking that up.
> 
> Rgds,  
> Ben

Yeah, that was my post) Actually somehow that time the problem fixed  
itself

---

<div class="post-metadata">

**Author:** ![roddik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@roddik](https://www.ruby-forum.com/u/roddik)\
**Post date:** [June 20, 2009, 11:06am UTC](https://www.ruby-forum.com/t/cant-use-gems/170652/4 "2009-06-20T11:06:07Z")

</div>

On Sat, Jun 20, 2009 at 9:42 AM, Rod D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> - x86-mswin32-60  
> - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)
> 
> D:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.

My apologies, it seems as though you posted that previous thread. 🙂

---

<div class="post-metadata">

**Author:** ![roddik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@roddik](https://www.ruby-forum.com/u/roddik)\
**Post date:** [June 21, 2009, 3:05am UTC](https://www.ruby-forum.com/t/cant-use-gems/170652/5 "2009-06-21T03:05:55Z")

</div>

On Jun 20, 2009, at 2:05, Rod D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Ben
> 
> Yeah, that was my post) Actually somehow that time the problem fixed  
> itself

Apparently not, since you’re asking about it again after requiring the  
same two files. Why don’t you get a debugger and then a backtrace.  
It’s hard to help you otherwise.

---

<div class="post-metadata">

**Author:** ![roddik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b3f665/32.png) [@roddik](https://www.ruby-forum.com/u/roddik)\
**Post date:** [June 20, 2009, 11:09am UTC](https://www.ruby-forum.com/t/cant-use-gems/170652/6 "2009-06-20T11:09:30Z")

</div>

the whole story is, I’ve started developing some app using mechanize and  
mysql and over time it started crashing with segfault on some weird  
occasions, showing completely usual lines like “a = ‘hello’” as the  
cause, so I decided to update my ruby patchlevel, one-click installer  
ships with some very old build, so I had to delete ruby and install i  
from binaries again
