# LoadError: no such file to load -- gem not found in irb, but found in app console

**URL:** <https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-gem-not-found-in-irb-but-found-in-app-console/189919>\
**Category:** Rails\
**Created:** [June 9, 2010, 11:36pm UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-gem-not-found-in-irb-but-found-in-app-console/189919 "2010-06-09T23:36:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 9, 2010, 11:36pm UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-gem-not-found-in-irb-but-found-in-app-console/189919/1 "2010-06-09T23:36:56Z")

</div>

I installed a gem (sudo gem install vzaar) , which is listed now in  
the gem list :  
… gem list  
rubyist-aasm (2.1.1)  
SystemTimer (1.2)  
vzaar (0.2.2.1)  
xml-simple (1.0.12)

in my app I am using this gem, without any problem

class Academy::PagesController \< ApplicationController  
require ‘hpricot’  
require ‘vzaar’

…

no problem in the console  
$ script/console  
Loading development environment (Rails 2.3.8)

> > require ‘vzaar’  
> > =\> []

but when using irb, I get a LoadError…  
re ‘vzaar’  
LoadError: no such file to load – vzaar  
from (irb):1:in `require’  
from (irb):1

what’s wrong with irb ???

here is my gem env

gem env  
RubyGems Environment:

- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [i686- darwin10.3.0]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
  - ruby
  - x86-darwin-10

- GEM PATHS:
  - /usr/local/lib/ruby/gems/1.8
  - /usr/lib/ruby/gems/1.8
  - /Users/yves/.gem/ruby/1.8/gems

- GEM CONFIGURATION:
  - :update\_sources =\> true
  - :verbose =\> true
  - :benchmark =\> false
  - :backtrace =\> false
  - :bulk\_threshold =\> 1000
  - “gempath” =\> [“/usr/lib/ruby/gems/1.8”, “/Users/yves/.gem/ruby/  
1.8/gems”]
  - :sources =\> [“[http://gems.rubyforge.org/](http://gems.rubyforge.org/)”, “http://  
[gems.github.com/](http://gems.github.com/)”, “[http://gemcutter.org/](http://gemcutter.org/)”, “[http://gems.github.com](http://gems.github.com)”,  
“[http://gems.github.com](http://gems.github.com)”]

- REMOTE SOURCES:
  - [http://gems.rubyforge.org/](http://gems.rubyforge.org/)
  - [http://gems.github.com/](http://gems.github.com/)
  - [http://gemcutter.org/](http://gemcutter.org/)
  - [http://gems.github.com](http://gems.github.com)

I notice that GEM\_PATH = /usr/local/lib/ruby/gems/1.8 (where are my  
rails gems  
but gempath" =\> [“/usr/lib/ruby/gems/1.8”, “/Users/yves/.gem/ruby/1.8/  
gems”]  
any trouble with that ?

thanks for your help…

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 10, 2010, 12:15am UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-gem-not-found-in-irb-but-found-in-app-console/189919/2 "2010-06-10T00:15:03Z")

</div>

Kad K. wrote:

> no problem in the console  
> $ script/console  
> Loading development environment (Rails 2.3.8)
> 
> > > require ‘vzaar’  
> > > =\> []
> 
> but when using irb, I get a LoadError…  
> re ‘vzaar’  
> LoadError: no such file to load – vzaar  
> from (irb):1:in `require’  
> from (irb):1
> 
> what’s wrong with irb ???

Did you try doing:

require ‘rubygems’

before the require of vzaar ? Rails probably does it for you already.

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [June 14, 2010, 2:24pm UTC](https://www.ruby-forum.com/t/loaderror-no-such-file-to-load-gem-not-found-in-irb-but-found-in-app-console/189919/3 "2010-06-14T14:24:44Z")

</div>

Perry S. wrote:

> Kad K. wrote:
> 
> > no problem in the console  
> > $ script/console  
> > Loading development environment (Rails 2.3.8)
> > 
> > > > require ‘vzaar’  
> > > > =\> []
> > 
> > but when using irb, I get a LoadError…  
> > re ‘vzaar’  
> > LoadError: no such file to load – vzaar  
> > from (irb):1:in `require’  
> > from (irb):1
> > 
> > what’s wrong with irb ???
> 
> Did you try doing:
> 
> require ‘rubygems’
> 
> before the require of vzaar ? Rails probably does it for you already.

Hey Kad, did the hint from Perry sort out the problem? You can also use  
[http://help.vzaar.com/](http://help.vzaar.com/) in case you needed any help with the vzaar gem  
itself.
