# Newbie Question

**URL:** <https://www.ruby-forum.com/t/newbie-question/106329>\
**Category:** Ruby\
**Created:** [June 8, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/newbie-question/106329 "2007-06-08T17:23:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [June 8, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/newbie-question/106329/1 "2007-06-08T17:23:42Z")

</div>

Hi guys, im trying an script that use Mongrel and Erubis, i just  
installed the gems with  
gem install mongrel  
gem install erubis

The installation went fine, without any error but everytime i try to  
run the script i get this message error,

`require’: no such file to load – erubis (LoadError)

It’s obvious that the script is not finding the previously installed  
gem, im using Ubuntu i installed rails using the .deb package in the  
repository and it works fine too, when i checked where was rails  
installed it is in the same path where rubygem installed the gems.

So i really don’t know where to check. Can somebody assist me with this.

Thanks

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [June 8, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/newbie-question/106329/2 "2007-06-08T17:41:44Z")

</div>

Hi,

On 8-Jun-07, at 11:22 AM, Rafael G. wrote:

> Hi guys, im trying an script that use Mongrel and Erubis, i just  
> installed the gems with  
> gem install mongrel  
> gem install erubis
> 
> The installation went fine, without any error but everytime i try to  
> run the script i get this message error,
> 
> `require’: no such file to load – erubis (LoadError)

I think you likely are not telling Ruby that you are using gems.  
Either define the environment variable:

export RUBYOPT=-rubygems

(for bash, some shells do this differently)

in your shell, or add ‘-rubygems’ to the command line when starting  
ruby.

There might be other ways, but I don’t know them.

You can test this by running irb and trying to require erubis.

Cheers,  
Bob

> –  
> Grimoire Guru  
> SourceMage GNU/Linux

* * *

Bob H. – tumblelog at \<http://  
www.recursive.ca/so/\>  
Recursive Design Inc. – weblog at \<[http://www.recursive.ca/](http://www.recursive.ca/)  
hutch\>  
– works at [http://www.recursive.ca/](http://www.recursive.ca/)

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [June 8, 2007, 5:53pm UTC](https://www.ruby-forum.com/t/newbie-question/106329/3 "2007-06-08T17:53:45Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![rafa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e495f1/32.png) [@rafa](https://www.ruby-forum.com/u/rafa)\
**Post date:** [June 8, 2007, 7:09pm UTC](https://www.ruby-forum.com/t/newbie-question/106329/4 "2007-06-08T19:09:52Z")

</div>

> There might be other ways, but I don’t know them.
> 
> You can test this by running irb and trying to require erubis.

you can also just  
require ‘rubygems’
