# FastCGI, shebang line options, and library path question

**URL:** <https://www.ruby-forum.com/t/fastcgi-shebang-line-options-and-library-path-question/99003>\
**Category:** Ruby\
**Created:** [July 19, 2006, 5:59pm UTC](https://www.ruby-forum.com/t/fastcgi-shebang-line-options-and-library-path-question/99003 "2006-07-19T17:59:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Gansen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b77776/32.png) [@Chris\_Gansen](https://www.ruby-forum.com/u/Chris_Gansen)\
**Post date:** [July 19, 2006, 5:59pm UTC](https://www.ruby-forum.com/t/fastcgi-shebang-line-options-and-library-path-question/99003/1 "2006-07-19T17:59:40Z")

</div>

Hello!

I’m trying to configure a simple script to test a ruby/apache/FastCGI  
setup  
here. I need to specify an alternate library path to the ruby  
executable, as  
the built-in search path is not sufficient. However, when invoked by  
FastCGI, it seems to ignore the -I switch.

Example shebang:

```
 #!/path/to/bin/ruby -I /path/to/lib/ruby/1.8

```

This line will run ruby, but the -I option is ignored.

when I run:

```
 ./ruby -I /path/to/lib/ruby/1.8 -e 'puts $:'

```

It appends the specified path.

Question: what’s the proper way to specify an alternate library path to  
the  
ruby interpreter when invoked as a FastCGI script?

Thanks!  
-c-

---

<div class="post-metadata">

**Author:** ![Chris\_Gansen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/b77776/32.png) [@Chris\_Gansen](https://www.ruby-forum.com/u/Chris_Gansen)\
**Post date:** [July 19, 2006, 6:34pm UTC](https://www.ruby-forum.com/t/fastcgi-shebang-line-options-and-library-path-question/99003/2 "2006-07-19T18:34:32Z")

</div>

On Thu, 2006-07-20 at 00:58 +0900, Chris Gansen wrote:

> Thanks!  
> -c-

Try setting $LOAD\_PATH (or $:) inside the script:

$:.unshift("/path/to/library")

Aria
