# FCGI Issues on Dreamhost

**URL:** <https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685>\
**Category:** Rails\
**Created:** [January 11, 2007, 11:05am UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685 "2007-01-11T11:05:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 11, 2007, 11:05am UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/1 "2007-01-11T11:05:14Z")

</div>

Hey everyone,

I use DreamHost for my web hosting and have just setup the Mephisto  
blogging engine at [http://blog.hanabi.co.uk](http://blog.hanabi.co.uk)

At the moment I am receiving a Rails Application error message. I  
contacted DreamHost support and they sent me the following;

Debugging your rails application is beyong our scope of support. Your  
fastcgi.crash.logs contained the following errors. I can suggest that  
you consult our member forum [http://discussion.dreamhost.com](http://discussion.dreamhost.com). Often  
times you can receive tips from users who have encountered similar  
problems. If you have any additional questions, please let us know.

[08/Jan/2007:15:21:23 :: 4602] Dispatcher failed to catch: private  
method ‘split’ called for nil:NilClass (NoMethodError)

/usr/lib/ruby/1.8/cgi.rb:897:in `parse’

…/config/…/vendor/rails/actionpack/lib/action\_controller/cgi\_ext/raw\_post\_data\_fix.rb:45:in  
`initialize\_query’

/usr/lib/ruby/1.8/cgi.rb:2274:in `initialize’

/usr/lib/ruby/1.8/fcgi.rb:594:in `new’

/usr/lib/ruby/1.8/fcgi.rb:594:in `each\_cgi’

…/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:141:in  
‘process\_each\_request!’

…/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:55:in  
‘process!’

…/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:25:in  
‘process!’

./dispatch.fcgi:24

killed by this error

Rick O. who develops Mephisto assures me that this is not a Mephisto  
error.

I have left a message on the DreamHost Discussion forum, but thought I  
would post here as well to see if anyone has come up against a similar  
error and perhaps knows of a solution?

Thanks,  
Neil.

---

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 11, 2007, 2:19pm UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/2 "2007-01-11T14:19:43Z")

</div>

Run it with WEBrick on port 3000 and try to connect to it (that actually  
does work on DH)

./script/server -e production

Also, check your production logs. Make sure the app actually is  
running in  
production too.

---

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 11, 2007, 2:31pm UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/3 "2007-01-11T14:31:43Z")

</div>

It took me a little finagling to get it working on DH, too. There are  
specific instructions to follow to get it to work (i.e., did you  
freeze edge to vendor? That was one of my problems):  
[http://mede.us/2006/12/1/mephisto-and-dreamhost](http://mede.us/2006/12/1/mephisto-and-dreamhost)

I think that’s the one I used.

–Jeremy

On 1/11/07, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> fastcgi.crash.logs contained the following errors. I can suggest that  
> `initialize\_query’  
> …/config/…/vendor/rails/railties/lib/fcgi\_handler.rb:55:in  
> Rick O. who develops Mephisto assures me that this is not a Mephisto
> 
> >

–  
My free Ruby e-book:  
[http://www.humblelittlerubybook.com/book/](http://www.humblelittlerubybook.com/book/)

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 11, 2007, 2:45pm UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/4 "2007-01-11T14:45:45Z")

</div>

Hey Jeremy,

Thanks for the reply.

I also used that guide to get it setup on the server. The installation  
ran okay using Terminal on Mac OSX, because at the end of the install -  
I was told to then login to the admin page.

It seems that there are a few people having FCGI problems with other  
apps on DreamHost.

---

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 11, 2007, 2:49pm UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/5 "2007-01-11T14:49:45Z")

</div>

Hey Brian,

Thanks for the reply.

I will certainly try the command that you have given. The production  
log was actually empty (the last time I ran it) - apart from the  
following message;

# Logfile created on Sun Jan 07 07:09:58 -0800 2007 by

logger.rb/1.5.2.9

Rick O. said that means that no requests are actually being received.

---

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 11, 2007, 3:08pm UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/6 "2007-01-11T15:08:01Z")

</div>

Either that or you’re not running in production mode. Make sure you are.  
Edit config/environment.rb and set the mode to production… some of my  
apps on DH require that before I can run in prodction; others do not.

---

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/7 "2007-01-19T16:30:59Z")

</div>

Heh, I’ve finally got the application working - in part.

I had to uncomment the following rule in the .htaccess file;

RewriteRule ^(.\*)$ dispatch.fcgi [QSA,L]

---

<div class="post-metadata">

**Author:** ![neilbain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/b487fb/32.png) [@neilbain](https://www.ruby-forum.com/u/neilbain)\
**Post date:** [January 11, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/fcgi-issues-on-dreamhost/81685/8 "2007-01-11T15:15:03Z")

</div>

Just checked the environment.rb file, and it seems to be set correctly.

ENV[‘RAILS\_ENV’] ||= ‘production’

However, I have noticed at the top of the file that it says;

# Be sure to restart your web server when you modify this file.

I originally edited the file before uploading any of the files for  
Mephisto - as this was the first time I installed it. So I assume it  
should automatically pick up the production environment?
