# Require load error

**URL:** <https://www.ruby-forum.com/t/require-load-error/137522>\
**Category:** Ruby\
**Created:** [May 13, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/require-load-error/137522 "2008-05-13T23:05:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [May 13, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/require-load-error/137522/1 "2008-05-13T23:05:49Z")

</div>

Hi,

I installed ‘hpricot’ and ‘wx’ (wxruby) libraries with gem command and  
when  
I try to start a program which uses those two libraries I get ‘require -  
no  
such file to load - hpricot (or wx)’. I have ruby 1.9.0. developer  
version  
installed on Windows.  
What is the problem here ?

Thanks.

---

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [May 13, 2008, 11:44pm UTC](https://www.ruby-forum.com/t/require-load-error/137522/2 "2008-05-13T23:44:48Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Haris B. wrote:  
| Hi,  
|  
| I installed ‘hpricot’ and ‘wx’ (wxruby) libraries with gem command and  
when  
| I try to start a program which uses those two libraries I get 'require

- 
  - no  
| such file to load - hpricot (or wx)'. I have ruby 1.9.0. developer  
version  
| installed on Windows.  
| What is the problem here ?

require ‘rubygems’ first.

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)

Don’t stop with your first draft.  
~ - The Elements of Programming Style (Kernighan & Plaugher)  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkgqC7AACgkQbtAgaoJTgL8T3gCfYzH+Fmd7BGipXvx/kTuXEc+1  
iAAAoIYu89dxCWK9tmlwWGzzaCFSV2Ct  
=evKQ  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [May 13, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/require-load-error/137522/3 "2008-05-13T23:46:33Z")

</div>

On Tue, May 13, 2008 at 4:05 PM, Haris B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi,
> 
> I installed ‘hpricot’ and ‘wx’ (wxruby) libraries with gem command and when  
> I try to start a program which uses those two libraries I get ‘require - no  
> such file to load - hpricot (or wx)’. I have ruby 1.9.0. developer version  
> installed on Windows.  
> What is the problem here ?
> 
> Thanks.

Maybe, you need require ‘rubygems’ first.

require ‘rubygems’  
require ‘hpricot’

Todd

---

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [May 14, 2008, 12:06am UTC](https://www.ruby-forum.com/t/require-load-error/137522/4 "2008-05-14T00:06:09Z")

</div>

“Phillip G.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote in message  
news:removed\_email\_address@domain.invalid…

> | such file to load - hpricot (or wx)'. I have ruby 1.9.0. developer  
> Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)  
> -----END PGP SIGNATURE-----

I have the line:  
require ‘rubygems’  
at the begining of the program.

This program worked before but I uninstalled and then installed ruby  
1.8.6  
few times and now I have ruby 1.9.0. developer version and it still  
doesn’t  
work. When I was installing those two gems it didn’t ask me which  
version to  
install (numbered list) like it did before. Maybe this tells something  
where  
the problem might be.

---

<div class="post-metadata">

**Author:** ![haris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/ccd318/32.png) [@haris](https://www.ruby-forum.com/u/haris)\
**Post date:** [May 14, 2008, 12:24am UTC](https://www.ruby-forum.com/t/require-load-error/137522/5 "2008-05-14T00:24:57Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Haris B. wrote:  
| “Phillip G.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote in message  
| news:removed\_email\_address@domain.invalid…  
| Haris B. wrote:  
| | Hi,  
| |  
| | I installed ‘hpricot’ and ‘wx’ (wxruby) libraries with gem command and  
| when  
| | I try to start a program which uses those two libraries I get ‘require  
| - no  
| | such file to load - hpricot (or wx)’. I have ruby 1.9.0. developer  
| version  
| | installed on Windows.  
| | What is the problem here ?  
|  
| require ‘rubygems’ first.  
|  
|  
|\>

| I have the line:  
| require ‘rubygems’  
| at the begining of the program.

| This program worked before but I uninstalled and then installed ruby  
1.8.6  
| few times and now I have ruby 1.9.0. developer version and it still  
doesn’t  
| work. When I was installing those two gems it didn’t ask me which  
version to  
| install (numbered list) like it did before. Maybe this tells something  
where  
| the problem might be.

Then the Ruby version you are launching doesn’t have the gems installed.  
Find out which Ruby interpreter launches, and install the gems for it.

Also: Newer RubyGems versions detect your platform automagically.

(And AFAIK, Ruby 1.9 includes RubyGems as part of the STDLIB.)

* * *

Phillip G.  
Twitter: [twitter.com/cynicalryan](http://twitter.com/cynicalryan)  
Blog: [http://justarubyist.blogspot.com](http://justarubyist.blogspot.com)

At the back of the roadhouse they’ve got some bungalows…  
and that’s for the people who like to go down slow…  
let it roll, baby, roll … all night long.  
~ – Jim M.on  
-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1.4.8 (MingW32)  
Comment: Using GnuPG with Mozilla - [http://enigmail.mozdev.org](http://enigmail.mozdev.org)

iEYEARECAAYFAkgqFP8ACgkQbtAgaoJTgL+A9ACfQDDvlxbd5YjowpKlHBsQnNv1  
XAAAoJaLXAEka1TEDSyQmIBg02ckNPm2  
=UcUR  
-----END PGP SIGNATURE-----
