# Requiring with eRuby problem

**URL:** <https://www.ruby-forum.com/t/requiring-with-eruby-problem/104087>\
**Category:** Ruby\
**Created:** [May 14, 2007, 8:16am UTC](https://www.ruby-forum.com/t/requiring-with-eruby-problem/104087 "2007-05-14T08:16:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![donut2d](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@donut2d](https://www.ruby-forum.com/u/donut2d)\
**Post date:** [May 14, 2007, 8:16am UTC](https://www.ruby-forum.com/t/requiring-with-eruby-problem/104087/1 "2007-05-14T08:16:09Z")

</div>

I have eRuby running on my Mac with a local dev server using MAMP  
(Apache).

Whenever I try to ‘require’ a file other than stuff life ‘cgi’ I get a  
500 Internal Server Error when trying to load the page in my browser.  
So “require ‘cgi’” works fine. But “require ‘anylocalfile’” doesn’t  
work.

I’m using a .htaccess file to enable eRuby with the eRuby binary in  
Apache’s cgi-bin directory with the following in the .htaccess:

* * *

AddHandler cgi-script .rb  
Action application/x-httpd-ruby /usr/local/bin/ruby

## DirectoryIndex index.rhtml index.html index.htm AddHandler application/x-httpd-eruby .rhtml Action application/x-httpd-eruby /cgi-bin/eruby

.rhtml files work just fine until I try to include one of my own .rb  
files within the htdocs root.

Any ideas?
