# Irb\> require 'fcgi.so' =\> 'no such file to load' error

**URL:** <https://www.ruby-forum.com/t/irb-require-fcgi-so-no-such-file-to-load-error/81950>\
**Category:** Ruby\
**Created:** [January 16, 2007, 2:15pm UTC](https://www.ruby-forum.com/t/irb-require-fcgi-so-no-such-file-to-load-error/81950 "2007-01-16T14:15:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DocPneumo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a698b9/32.png) [@DocPneumo](https://www.ruby-forum.com/u/DocPneumo)\
**Post date:** [January 16, 2007, 2:15pm UTC](https://www.ruby-forum.com/t/irb-require-fcgi-so-no-such-file-to-load-error/81950/1 "2007-01-16T14:15:30Z")

</div>

5th try

I submitted a shorter version of this yesterday but it does not seem to  
have ever shown up.

I have a fresh install of Ruby, RubyGems, FastCGI and ruby-fcgi (gem  
install fcgi). I’ve done this under fc4 & fc5. Ruby & FastCGI were  
compiled from source.  
RubyGems was installed via setup.rb.

irb\> require ‘fcgi.so’ gives a ‘no such file to load’ error.  
Searching for the file locates it at:  
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.so  
Trying a require to the absolute path:  
irb\> require ‘/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.so’ =\>  
true

I’d rather not have to use require ‘\<path\_to\_fcgi\>/fcgi.so’ whenever I  
need to require ‘fcgi.so’. Is there any way to permanently add  
path\_to\_fcgi.so to Ruby’s loadpath? I’ve added the path to  
/etc/ld.so.conf.d/fcgi.conf without joy.

Is there a glitch in the way this gem has been installed?  
I see that :  
irb\> require ‘mysql’ =\> true  
but  
irb\> require ‘net-ssh’ and require ‘chronic’ among others all give the  
‘no such file to load’ error.  
each of these was loaded with ‘gem install xxx’ apparently without  
hitch. Each seems to work when used within my rails apps. I do not  
really have a handle on how the gem install mechanism and associated  
load paths work. Perhaps all is ok, but at least one author, James  
Duncan Davidson, uses testing with irb\> require ‘fcgi.so’ to assure a  
correct install of fcgi.so.

Oh, one last thing: irb\> puts $LOADPATH =\> nil

---

<div class="post-metadata">

**Author:** ![DocPneumo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a698b9/32.png) [@DocPneumo](https://www.ruby-forum.com/u/DocPneumo)\
**Post date:** [January 16, 2007, 2:21pm UTC](https://www.ruby-forum.com/t/irb-require-fcgi-so-no-such-file-to-load-error/81950/2 "2007-01-16T14:21:31Z")

</div>

DocPneumo wrote:

> irb\> require ‘fcgi.so’ gives a ‘no such file to load’ error.  
> Searching for the file locates it at:  
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.so  
> Trying a require to the absolute path:  
> irb\> require ‘/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.so’ =\>  
> true

Just a stupid idea: have you tried require ‘fcgi’ ?

Cheers,

Vince

---

<div class="post-metadata">

**Author:** ![DocPneumo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a698b9/32.png) [@DocPneumo](https://www.ruby-forum.com/u/DocPneumo)\
**Post date:** [January 16, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/irb-require-fcgi-so-no-such-file-to-load-error/81950/3 "2007-01-16T15:26:01Z")

</div>

Vincent F. wrote:

> > 
> 
> ## Vince
> 
> Vincent F., PhD student  
> [http://vincent.fourmond.neuf.fr/](http://vincent.fourmond.neuf.fr/)

Yes. I tried that as well. Same response. In addition, I have added  
‘export RUBYOPT=rubygems’ to ~/.bash\_profile. This was recommended in a  
discussion of the mechanics of RubyGems I found on the web.

---

<div class="post-metadata">

**Author:** ![DocPneumo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a698b9/32.png) [@DocPneumo](https://www.ruby-forum.com/u/DocPneumo)\
**Post date:** [January 17, 2007, 7:10am UTC](https://www.ruby-forum.com/t/irb-require-fcgi-so-no-such-file-to-load-error/81950/4 "2007-01-17T07:10:09Z")

</div>

On Tuesday 16 January 2007 23:25, DocPneumo wrote:

> > > RubyGems was installed via setup.rb.  
> > > Cheers,
> > 
> > ## Vince
> > 
> > Vincent F., PhD student  
> > [http://vincent.fourmond.neuf.fr/](http://vincent.fourmond.neuf.fr/)
> 
> Yes. I tried that as well. Same response. In addition, I have added  
> ‘export RUBYOPT=rubygems’ to ~/.bash\_profile. This was recommended in a  
> discussion of the mechanics of RubyGems I found on the web.

sorry, but this should read

export RUBYOPT=-rubygems

[http://rubygems.org/read/chapter/3#page70](http://rubygems.org/read/chapter/3#page70) for more information

^manveru

---

<div class="post-metadata">

**Author:** ![DocPneumo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a698b9/32.png) [@DocPneumo](https://www.ruby-forum.com/u/DocPneumo)\
**Post date:** [January 17, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/irb-require-fcgi-so-no-such-file-to-load-error/81950/5 "2007-01-17T17:01:13Z")

</div>

Michael F. wrote:

> > > > compiled from source.
> 
> sorry, but this should read
> 
> export RUBYOPT=-rubygems
> 
> [http://rubygems.org/read/chapter/3#page70](http://rubygems.org/read/chapter/3#page70) for more information
> 
> ^manveru

Thanks. That is the correct reference for my RUBYOPT addition to  
~/.bashrc. The manual shows the line exactly as I have it: ‘export  
RUBYOPT=rubygems’ without the ‘-’. Is that a typo in the manual? In any  
event, making the change you suggested had no effect on the response  
to"require ‘fcgi.so’" in irb. (I did restart irb to allow the  
environment change to be seen. I am running irb as the correct user,  
not as root, Running irb as root has the same effect, however.)
