Dispatcher failed to catch: with empty/new app

Hi there,

I recently made some changes to my Gems and upgraded rails and ruby and
now I’m getting a very weird error message.

If I create a new and empty app with rails and execute dispatch.fcgi I
get the following error in fastcgi.crash.log:

[26/Jun/2007:14:53:20 :: 12489] starting
[26/Jun/2007:14:53:20 :: 12489] Dispatcher failed to catch: You have a
nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split (NoMethodError)
/usr/local/lib/ruby/1.8/cgi.rb:897:in parse' ../config/../vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb:45:ininitialize_query’
/usr/local/lib/ruby/1.8/cgi.rb:2273:in initialize' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:innew’
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:in
each_cgi' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:141:inprocess_each_request!’
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:55:in
process!' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:25:inprocess!’
./dispatch.fcgi:24
almost killed by this error
[26/Jun/2007:14:53:20 :: 12489] Dispatcher failed to catch: You have a
nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split (NoMethodError)
/usr/local/lib/ruby/1.8/cgi.rb:897:in parse' ../config/../vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb:45:ininitialize_query’
/usr/local/lib/ruby/1.8/cgi.rb:2273:in initialize' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:innew’
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:606:in
each_cgi' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:141:inprocess_each_request!’
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:55:in
process!' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:25:inprocess!’
./dispatch.fcgi:24
killed by this error

Of course my previously working apps are not working.

My system specs are:
ruby -v
ruby 1.8.5 (2006-08-25) [i686-linux]

rails -v
Rails 1.2.3

gem list

*** LOCAL GEMS ***

actionmailer (1.3.3, 1.2.5, 1.2.4, 1.2.3)
actionpack (1.13.3, 1.12.5, 1.12.4, 1.12.3)
actionwebservice (1.2.3, 1.1.6, 1.1.5, 1.1.4)
activerecord (1.15.3, 1.14.4, 1.14.3)
activesupport (1.4.2, 1.3.1)
fcgi (0.8.7)
gemsonrails (0.6.4)
gettext (1.9.0, 1.8.0)
mysql (2.7)
rails (1.2.3, 1.1.6, 1.1.5, 1.1.4)
rake (0.7.3, 0.7.1)
rmagick (1.15.7, 1.14.0)
ruby-debug (0.9.3)
ruby-debug-base (0.9.3)
sources (0.0.1)
tzinfo (0.3.3, 0.3.1)
wirble (0.1.2)

Anyone knows where to begin looking for the problem?

Miquel A. wrote:

Hi there,

I recently made some changes to my Gems and upgraded rails and ruby and
now I’m getting a very weird error message.

If I create a new and empty app with rails and execute dispatch.fcgi I
get the following error in fastcgi.crash.log:

[26/Jun/2007:14:53:20 :: 12489] starting
[26/Jun/2007:14:53:20 :: 12489] Dispatcher failed to catch: You have a
nil object when you didn’t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split (NoMethodError)
/usr/local/lib/ruby/1.8/cgi.rb:897:in `parse’
[…]

I am getting this too. here is my configuration:
ruby 1.8.4 (linux)
rails 1.2.3
fcgi 0.8.7

The error can be found on google very often, but I did not find any
responds or postings of workarounds.

Has anyone a configuration where this does not happen for an empty rails
app when executing ./public/dispatch.fcgi ? If so please post your
configuration:

  • Ruby version
  • Rails version
  • FastCGI and fcgi version

thanks!
– henon

By making changes to your gems do you mean you updated your version of
ruby gems? Can you elaborate on what changes you made?

-Vince

On 6/27/07, Henon [email protected] wrote:

rails 1.2.3

  • FastCGI and fcgi version

thanks!
– henon


Posted via http://www.ruby-forum.com/.


support independent business – http://www.buyindie.net/

Vince W. wrote:

By making changes to your gems do you mean you updated your version of
ruby gems? Can you elaborate on what changes you made?
[…]

I updated some gems (activerecord, activesuport and rails mainly) but I
did not had a working envirovment previous to that neither I know for
sure the versions I had…

I had for sure rails 1.1.6
I can’t be sure about the other stuff.

I haven’t solved the problem but I’ve been able to get a workarround…
with
ruby 1.8.4 (linux)
rails 1.2.3
fcgi 0.8.7
and lighttpd I managed to get it working… without the nil object
error.
Anyway I’m still interested in finding a solution, of course.

I’m sorry not to have more information about my previous state Vince…
I had such a hell of a day yesterday :slight_smile: I hope my little indications
help anyway.

Thanks!

Vince W. wrote:

If you didn’t have a working version of rails before updating then it
stands to chance that the update itself didn’t break anything.
It’s a possibility… but my error prior to installing was way
different.
And not ocurring on an empty application.

May I ask which distribution of linux you are using? I’ve written some
decent tutorials on installing rails on ubuntu which might be helpful:
I’ll see if anything helps, thank you.

Also, if it works with lighttpd, then is your issue local development?
Are you using webrick or mongrel?
Sorry… my english didn’t catch up here…
what do you mean with issue?

I was using apache and fastcgi and now I’m using apache with modproxy to
redirect all the rails aplications to lighttpd and fastcgi.

Thanks!

If you didn’t have a working version of rails before updating then it
stands to chance that the update itself didn’t break anything. May I
ask which distribution of linux you are using? I’ve written some
decent tutorials on installing rails on ubuntu which might be helpful:

http://urbanpuddle.com/articles/2006/12/07/install-ruby-rails-on-ubuntu-edgy-eft

Also, if it works with lighttpd, then is your issue local development?
Are you using webrick or mongrel?

-Vince

On 6/27/07, Miquel A. [email protected] wrote:

I had for sure rails 1.1.6
Anyway I’m still interested in finding a solution, of course.


support independent business – http://www.buyindie.net/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs