# Rails "Application Error" with apache and mod\_fcgid

**URL:** <https://www.ruby-forum.com/t/rails-application-error-with-apache-and-mod-fcgid/60822>\
**Category:** Rails\
**Created:** [May 17, 2006, 8:02pm UTC](https://www.ruby-forum.com/t/rails-application-error-with-apache-and-mod-fcgid/60822 "2006-05-17T20:02:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [May 17, 2006, 8:02pm UTC](https://www.ruby-forum.com/t/rails-application-error-with-apache-and-mod-fcgid/60822/1 "2006-05-17T20:02:45Z")

</div>

Hello,

I have a gentoo system that I am trying to remotely develop rails  
applications on using apache and fcgi. I created the simple hello world  
example from Dave T.’ book to test the system and I receive an  
“application error” when I try to go to the page. I can startup webrick  
and use links to view the page just fine, but nothing doing through  
apache.

I have looked at many tutorials that google has turned up and can’t seem  
to find what I’m doing wrong. Here are the versions I’m using:

apache-2.0.55-r1 mod\_fcgid-1.07-r1 ruby-fcgi-0.8.6 mysql-4.1.19 mysql-ruby-2.7 DBD-mysql-2.9007 rails-1.1.2 actionmailer-1.2.1 actionpack-1.12.1 actionwebservice-1.1.2 activerecord-1.14.2 activesupport-1.3.1 rake-0.7.1

My apache httpd.conf file has these lines added:

LoadModule fcgid\_module modules/mod\_fcgid.so AddHandler fcgid-script .fcgi

My vhosts.conf file has:

\<virtualHost \*:80\> DocumentRoot /var/www ServerName myServer.com ErrorLog /var/www/apache.log

```
&lt;Directory "/var/www"&gt;
    Order deny,allow
    Options none
    AllowOverride none

```

\</Directory\>  
\<Directory “/var/www/rails”\>  
Options ExecCGI FollowSymLinks  
AllowOverride all  
Order allow,deny  
Allow from all  
\</Directory\>  
\</VirtualHost\>

In my rails public folder I’ve added:

AddHandler fcgid-script .fcgi RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]

I tried running “ruby -d dispatch.fcgi” to see what the problem is and I  
get a long list of complaints that I can’t pinpoint whats wrong. Here  
is that output:

linuxserver public # ruby -d dispatch.fcgi Exception `NameError' at ./../config/boot.rb:14 - uninitialized constant Rails /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/validations.rb:334: warning: `\*' interpreted as argument prefix /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active\_record/validations.rb:363: warning: `*' interpreted as argument prefix /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/migration.rb:224: warning: instance variable @ignore_new_methods not initialized /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/migration.rb:224: warning: instance variable @ignore_new_methods not initialized /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:41: warning: method redefined; discarding old allow_concurrency= /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/connection_adapters/sqlserver_adapter.rb:456: warning: method redefined; discarding old remove_column Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- db2/db2cli Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- db2/db2cli Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- db2/db2cli /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active\_record/connection\_adapters/oracle\_adapter.rb:119: warning: (...) interpreted as grouped expression Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21 - no such file to load -- oci8 Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- oci8 Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- oci8 Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- oci8 Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- oci8 Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- oci8 Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/kernel/requires.rb:19 - no such file to load -- oci8 Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- sybsql Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- sybsql Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- sybsql /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action\_controller/request.rb:169: warning: method redefined; discarding old relative\_url\_root Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21 - no such file to load -- Win32API Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- Win32API Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- Win32API /usr/lib/ruby/1.8/cgi/session/pstore.rb:17: warning: method redefined; discarding old []= /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_ext/raw_post_data_fix.rb:57: warning: ambiguous first argument; put parentheses or even spaces /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/cgi_ext/raw_post_data_fix.rb:8: warning: method redefined; discarding old initialize_query Exception `DRb::DRbServerNotFound' at /usr/lib/ruby/1.8/drb/drb.rb:1647 - DRb::DRbServerNotFound Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21 - no such file to load -- memcache Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- memcache Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- memcache /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session/active_record_store.rb:129: warning: private attribute? /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/session/active_record_store.rb:179: warning: method redefined; discarding old connection Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- redcloth Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- redcloth Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- redcloth Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21 - no such file to load -- redcloth Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- redcloth Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- redcloth Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/core\_ext/kernel/requires.rb:19 - no such file to load -- redcloth Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21 - no such file to load -- bluecloth Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- bluecloth Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- bluecloth Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- bluecloth Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- bluecloth Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- bluecloth Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/core_ext/kernel/requires.rb:19 - no such file to load -- bluecloth Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- html/tokenizer Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- html/tokenizer Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- html/tokenizer /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action\_view/helpers/prototype\_helper.rb:640: warning: ambiguous first argument; put parentheses or even spaces /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action\_view/helpers/prototype\_helper.rb:873: warning: `*' interpreted as argument prefix /usr/lib/ruby/gems/1.8/gems/actionmailer-1.2.1/lib/action_mailer/vendor/tmail/facade.rb:486: warning: method redefined; discarding old create_reply Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- tmail/base64.so Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- tmail/base64.so Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- tmail/base64.so Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21 - no such file to load -- tmail/scanner_c.so Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- tmail/scanner\_c.so Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- tmail/scanner_c.so Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- xml/parser Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- xml/parser Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- xml/parser Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- xml/parser Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- xml/parser Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21 - no such file to load -- xmlscan/scanner Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- xmlscan/scanner Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- xmlscan/scanner Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:29 - no such file to load -- xmlscan/scanner Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:150 - no such file to load -- xmlscan/scanner Set XSD::XMLParser::REXMLParser as XML processor. Exception `MissingSourceFile' at /usr/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:21 - no such file to load -- http-access2 Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29 - no such file to load -- http-access2 Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:150 - no such file to load -- http-access2 Loading http-access2 failed. Net/http is used. /usr/lib/ruby/gems/1.8/gems/actionwebservice-1.1.2/lib/action\_web\_service/protocol/xmlrpc\_protocol.rb:6: warning: discarding old message /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:581: warning: method redefined; discarding old []= /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:590: warning: method redefined; discarding old [] /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:595: warning: method redefined; discarding old keys /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:600: warning: method redefined; discarding old find\_pair /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:607: warning: method redefined; discarding old []= /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:611: warning: method redefined; discarding old [] /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:615: warning: method redefined; discarding old method\_missing /usr/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/initializer.rb:483: warning: instance variable @after\_initialize\_block not initialized Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/i686-linux/fcgi.so:0 - libfcgi.so.0: cannot open shared object file: No such file or directory - /usr/lib/ruby/site_ruby/1.8/i686-linux/fcgi.so Exception `NoMethodError' at /usr/lib/ruby/site\_ruby/1.8/fcgi.rb:593 - undefined method `is_cgi?' for FCGI:Class (eval):3: warning: redefine remove_params (eval):13: warning: method redefined; discarding old initialize (eval):19: warning: method redefined; discarding old args (eval):22: warning: method redefined; discarding old env_table (eval):25: warning: method redefined; discarding old stdinput (eval):28: warning: method redefined; discarding old stdoutput Exception `NoMethodError' at /usr/lib/ruby/site\_ruby/1.8/fcgi.rb:593 - undefined method `is\_cgi?' for FCGI:Class linuxserver public #

Is there anything I’m missing? Thank you for any help you can provide!

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [June 17, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/rails-application-error-with-apache-and-mod-fcgid/60822/2 "2006-06-17T23:42:24Z")

</div>

I am having the exact same problem - were you able to find a solution?

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [June 22, 2006, 9:57am UTC](https://www.ruby-forum.com/t/rails-application-error-with-apache-and-mod-fcgid/60822/3 "2006-06-22T09:57:18Z")

</div>

Jeff Dean wrote:

> I am having the exact same problem - were you able to find a solution?

This command fix this problem for me. I don’t know, this is good  
solution, bud works.

chmod -Rcv 777 /your\_rails\_app

---

<div class="post-metadata">

**Author:** ![crenner](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/278dde/32.png) [@crenner](https://www.ruby-forum.com/u/crenner)\
**Post date:** [June 22, 2006, 12:16pm UTC](https://www.ruby-forum.com/t/rails-application-error-with-apache-and-mod-fcgid/60822/4 "2006-06-22T12:16:43Z")

</div>

Thanks for that - I tried it and it still doesn’t work.

I also tried giving similar permissions to the other directories related  
to rails (the ruby directory, directories that hold the fcgi/fcgid files  
etc…) and still nothing.
