# Irb error on startup

**URL:** <https://rubytalk.org/t/irb-error-on-startup/48371>\
**Category:** ruby-talk\
**Created:** [15 August 2008 22:33 UTC](https://rubytalk.org/t/irb-error-on-startup/48371 "2008-08-15T22:33:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pravin\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@Pravin\_Kumar](https://rubytalk.org/u/Pravin_Kumar)\
**Post date:** [15 August 2008 22:33 UTC](https://rubytalk.org/t/irb-error-on-startup/48371/1 "2008-08-15T22:33:56Z")

</div>

Hi,

I am having a problem that I've not seen before and would appreciate  
some help in debugging.

When I try to start irb, I get the following error:  
vadai:~ ppk$ irb  
/Library/Ruby/Site/1.8/rubygems/custom\_require.rb:27:in  
`gem\_original\_require': no such file to load -- config/environment.rb  
(LoadError)  
&nbsp;&nbsp;from /Library/Ruby/Site/1.8/rubygems/custom\_require.rb:27:in `require'  
&nbsp;&nbsp;from  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:253:in  
`load\_modules'  
&nbsp;&nbsp;from  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:251:in  
`each'  
&nbsp;&nbsp;from  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:251:in  
`load\_modules'  
&nbsp;&nbsp;from  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/init.rb:21:in  
`setup'  
&nbsp;&nbsp;from  
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb.rb:54:in  
`start'  
&nbsp;&nbsp;from /usr/bin/irb:13

Any help would be appreciated. Thanks.

My environment:

System: Mac OS X 10.5.4  
Ruby: ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]  
gem: 1.2.0  
rails: Rails 2.1.0  
Gems:  
\*\*\* LOCAL GEMS \*\*\*

actionmailer (2.1.0, 1.3.6)  
actionpack (2.1.0, 1.13.6)  
actionwebservice (1.2.6)  
activerecord (2.1.0, 1.15.6)  
activeresource (2.1.0)  
activesupport (2.1.0, 1.4.4)  
acts\_as\_ferret (0.4.3, 0.4.1)  
capistrano (2.4.3, 2.0.0)  
cgi\_multipart\_eof\_fix (2.5.0, 2.2)  
daemons (1.0.10, 1.0.9, 1.0.7)  
dnssd (0.7.0, 0.6.0)  
fastthread (1.0.1, 1.0)  
fcgi (0.8.7)  
ferret (0.11.6, 0.11.4)  
gem\_plugin (0.2.3, 0.2.2)  
highline (1.4.0, 1.2.9)  
hpricot (0.6.161, 0.6)  
libxml-ruby (0.8.3, 0.3.8.4)  
mongrel (1.1.5, 1.1.4, 1.0.1)  
needle (1.3.0)  
net-scp (1.0.1)  
net-sftp (2.0.1, 1.1.0)  
net-ssh (2.0.3, 1.1.2)  
net-ssh-gateway (1.0.0)  
rails (2.1.0, 1.2.6)  
rake (0.8.1, 0.7.3)  
rb-appscript (0.5.1)  
RedCloth (4.0.1, 3.0.4)  
ruby-openid (2.1.2, 1.1.4)  
ruby-yadis (0.3.4)  
rubygems-update (1.2.0)  
rubynode (0.1.5, 0.1.3)  
rubyosa (0.4.0)  
sqlite3-ruby (1.2.2, 1.2.1)  
termios (0.9.4)

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

---

<div class="post-metadata">

**Author:** ![Pravin\_Kumar](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@Pravin\_Kumar](https://rubytalk.org/u/Pravin_Kumar)\
**Post date:** [26 August 2008 17:37 UTC](https://rubytalk.org/t/irb-error-on-startup/48371/2 "2008-08-26T17:37:44Z")

</div>

I still haven't solved the problem, but I noticed that when I type in  
the full path to irb at the shell prompt, /usr/bin/irb, I don't have  
this problem. It just starts up fine. If I type "irb" then I get this  
problem.

Any suggestions?

Thanks.

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

---

<div class="post-metadata">

**Author:** ![Ryan\_Davis1](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/ryan_davis1/32/1848_2.png) [@Ryan\_Davis1](https://rubytalk.org/u/Ryan_Davis1)\
**Post date:** [26 August 2008 18:35 UTC](https://rubytalk.org/t/irb-error-on-startup/48371/3 "2008-08-26T18:35:16Z")

</div>

% which irb

it'll prolly answer /usr/local/bin/irb or somesuch... that means you've got multiple installs of ruby on your system and neither has a customized suffix (like ruby19 or ruby187). I recommend against that. Consider nuking your second install and reinstalling with --suffix passed to configure.

> **···**
>
> On Aug 26, 2008, at 10:37 , Pravin Kumar wrote:
> 
> > I still haven't solved the problem, but I noticed that when I type in  
> > the full path to irb at the shell prompt, /usr/bin/irb, I don't have  
> > this problem. It just starts up fine. If I type "irb" then I get this  
> > problem.

---

<div class="post-metadata">

**Author:** ![Steve\_Lewis1](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@Steve\_Lewis1](https://rubytalk.org/u/Steve_Lewis1)\
**Post date:** [27 August 2008 14:05 UTC](https://rubytalk.org/t/irb-error-on-startup/48371/4 "2008-08-27T14:05:40Z")

</div>

Pravin Kumar wrote:

> I still haven't solved the problem, but I noticed that when I type in  
> the full path to irb at the shell prompt, /usr/bin/irb, I don't have  
> this problem. It just starts up fine. If I type "irb" then I get this  
> problem.
> 
> Any suggestions?
> 
> Thanks.

Make sure that irb is in your path, for starters...
