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]
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:
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 I hope my little indications
help anyway.
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.
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: