# Rails and Apache: Error

**URL:** <https://www.ruby-forum.com/t/rails-and-apache-error/53009>\
**Category:** Rails\
**Created:** [January 22, 2006, 6:36pm UTC](https://www.ruby-forum.com/t/rails-and-apache-error/53009 "2006-01-22T18:36:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lieven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c37758/32.png) [@lieven](https://www.ruby-forum.com/u/lieven)\
**Post date:** [January 22, 2006, 6:36pm UTC](https://www.ruby-forum.com/t/rails-and-apache-error/53009/1 "2006-01-22T18:36:08Z")

</div>

I’ve done my development using WEBrick, and now I want to put my  
application on a server that uses Apache. (not with fcgi)  
I think I’ve done everything like I’m supposed to, but when surfing to  
my site I get:

Application error  
Rails application failed to start properly"

In /var/log/apache/error\_log, I get this error:

/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
`require__': no such file to load -- initializer (LoadError) from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in`require’  
from  
/home/lddekeyz/public\_html/tonefinder/…/…/Documents/development/tonefinder/config/boot.rb:14  
from  
/home/lddekeyz/public\_html/tonefinder/…/…/Documents/development/tonefinder/config/environment.rb:10  
from /home/lddekeyz/public\_html/tonefinder/dispatch.cgi:3  
[Sun Jan 22 18:26:29 2006] [error] [client 127.0.0.1] Premature end of  
script headers: /home/lddekeyz/public\_html/tonefinder/dispatch.cgi

---

<div class="post-metadata">

**Author:** ![lieven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c37758/32.png) [@lieven](https://www.ruby-forum.com/u/lieven)\
**Post date:** [January 23, 2006, 8:51am UTC](https://www.ruby-forum.com/t/rails-and-apache-error/53009/2 "2006-01-23T08:51:00Z")

</div>

Am Sonntag, den 22.01.2006, 18:36 +0100 schrieb Lieven De Keyzer:

> /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
> script headers: /home/lddekeyz/public\_html/tonefinder/dispatch.cgi

One simple question: Do you have the Rails packages installed?

gem install rails --include-dependencies

–  
Norman T.

[http://blog.inlet-media.de](http://blog.inlet-media.de)

---

<div class="post-metadata">

**Author:** ![lieven](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/c37758/32.png) [@lieven](https://www.ruby-forum.com/u/lieven)\
**Post date:** [January 23, 2006, 5:19pm UTC](https://www.ruby-forum.com/t/rails-and-apache-error/53009/3 "2006-01-23T17:19:33Z")

</div>

Norman T. wrote:

> Am Sonntag, den 22.01.2006, 18:36 +0100 schrieb Lieven De Keyzer:
> 
> > /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21:in  
> > script headers: /home/lddekeyz/public\_html/tonefinder/dispatch.cgi
> 
> One simple question: Do you have the Rails packages installed?
> 
> gem install rails --include-dependencies
> 
> –  
> Norman T.
> 
> [http://blog.inlet-media.de](http://blog.inlet-media.de)

Yes, I have installed Rails 1.0 this way.

It seems it goes wrong in config/boot.rb. This is a code snippet from  
that file:

if File.directory?(“#{RAILS\_ROOT}/vendor/rails”)  
require “#{RAILS\_ROOT}/vendor/rails/railties/lib/initializer”  
else  
require ‘rubygems’  
require ‘initializer’  
end

rubygems gets loaded, initializer can not be found.

If I change that line to as follows:

require ‘rubygems’  
require ‘/usr/local/lib/ruby/gems/gems/rails-1.0.0/lib/initializer’

then initializer is loaded, but I get

`require\_\_': no such file to load – active\_record (LoadError)
