# Error with 'require'

**URL:** <https://rubytalk.org/t/error-with-require/52807>\
**Category:** ruby-talk\
**Created:** [13 April 2009 01:18 UTC](https://rubytalk.org/t/error-with-require/52807 "2009-04-13T01:18:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kris\_Thomsen](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@Kris\_Thomsen](https://rubytalk.org/u/Kris_Thomsen)\
**Post date:** [13 April 2009 01:18 UTC](https://rubytalk.org/t/error-with-require/52807/1 "2009-04-13T01:18:47Z")

</div>

Hi!

I'm new to Ruby.

I try to make a "require 'nokogiri", but get this error:

nationalBanken.rb:1:in `require': no such file to load -- nokogiri  
(LoadError)  
&nbsp;&nbsp;from nationalBanken.rb:1

I have tried to install nokogiri both from gems and from a Fedora 10  
package: rubygem-nokogiri.  
I get the same error when I tried with hpricot.

Anyone who can help?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Phlip1](https://avatars.discourse-cdn.com/v4/letter/p/df788c/32.png) [@Phlip1](https://rubytalk.org/u/Phlip1)\
**Post date:** [13 April 2009 01:25 UTC](https://rubytalk.org/t/error-with-require/52807/2 "2009-04-13T01:25:11Z")

</div>

Kris Thomsen wrote:

> nationalBanken.rb:1:in `require': no such file to load -- nokogiri  
> (LoadError)  
> &nbsp;&nbsp;from nationalBanken.rb:1

require 'rubygems' first.

---

<div class="post-metadata">

**Author:** ![Kris\_Thomsen](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@Kris\_Thomsen](https://rubytalk.org/u/Kris_Thomsen)\
**Post date:** [13 April 2009 01:33 UTC](https://rubytalk.org/t/error-with-require/52807/3 "2009-04-13T01:33:15Z")

</div>

Phlip wrote:

> Kris Thomsen wrote:
> 
> > nationalBanken.rb:1:in `require': no such file to load -- nokogiri  
> > (LoadError)  
> > &nbsp;&nbsp;from nationalBanken.rb:1
> 
> require 'rubygems' first.

Thanks!  
That worked perfect 🙂

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/\](http://www.ruby-forum.com/%5C).
