Fastcgi issue on production

I just deployed my rails app to my production server. It’s all working
locally, but when I switched it over to the production server (at
dreamhost) I get this error:

Logfile created on Sun Aug 19 15:22:48 -0700 2007 by logger.rb/

1.5.2.9
[19/Aug/2007:15:22:48 :: 1841] starting
[19/Aug/2007:15:22:48 :: 1841] 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/lib/ruby/1.8/cgi.rb:897:in parse' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ cgi_ext/raw_post_data_fix.rb:45:ininitialize_query’
/usr/lib/ruby/1.8/cgi.rb:2274:in initialize' /usr/lib/ruby/1.8/fcgi.rb:594:innew’
/usr/lib/ruby/1.8/fcgi.rb:594:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:inprocess_each_request!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:inprocess!’
./dispatch.fcgi:24
almost killed by this error
[19/Aug/2007:15:22:48 :: 1841] 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/lib/ruby/1.8/cgi.rb:897:in parse' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ cgi_ext/raw_post_data_fix.rb:45:ininitialize_query’
/usr/lib/ruby/1.8/cgi.rb:2274:in initialize' /usr/lib/ruby/1.8/fcgi.rb:594:innew’
/usr/lib/ruby/1.8/fcgi.rb:594:in each_cgi' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:inprocess_each_request!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:in
process!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:inprocess!’
./dispatch.fcgi:24
killed by this error

Does anyone have any ideas of what’s going on?

dispatch is set to the correct path, db is right. So I don’t know what
I’m doing wrong here.

It continues - I’ve got two of the controllers working, but not the
blog controller. Here’s development.log:

Processing BlogController#index (for 76.86.184.44 at 2007-08-19
15:41:07) [GET]
Session ID: 4d90af3182d96ef839df6d400fd50bbd
Parameters: {“action”=>“index”, “controller”=>“blog”}

Mysql::Error (Can’t connect to local MySQL server through socket ‘/tmp/
mysql.sock’ (2)):
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/mysql_adapter.rb:389:in real_connect' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/mysql_adapter.rb:389:inconnect’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/mysql_adapter.rb:152:in initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/mysql_adapter.rb:82:innew’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/mysql_adapter.rb:82:in mysql_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/abstract/connection_specification.rb:262:insend’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/abstract/connection_specification.rb:262:in
connection_without_query_cache=' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ query_cache.rb:54:inconnection=’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
connection_adapters/abstract/connection_specification.rb:230:in
retrieve_connection' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ connection_adapters/abstract/connection_specification.rb:78:inconnection’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:763:in columns' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ calculations.rb:257:incolumn_for’
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
calculations.rb:116:in calculate' /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ calculations.rb:45:incount’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/pagination.rb:173:in
count_collection_for_pagination' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/pagination.rb:197:inpaginator_and_collection_for’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/pagination.rb:130:in paginate' /app/controllers/blog_controller.rb:13:inlist’
/app/controllers/blog_controller.rb:4:in index' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/base.rb:1095:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/base.rb:1095:in perform_action_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/filters.rb:632:incall_filter’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/filters.rb:634:in call_filter' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/filters.rb:638:incall_filter’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/filters.rb:438:in call' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/filters.rb:637:incall_filter’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/filters.rb:619:in perform_action_without_benchmark' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/benchmarking.rb:66:inperform_action_without_rescue’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/benchmarking.rb:66:inperform_action_without_rescue’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/rescue.rb:83:in perform_action' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/base.rb:430:insend’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/base.rb:430:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/filters.rb:624:inprocess_without_session_management_support’
/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/
action_controller/session_management.rb:114:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/ action_controller/base.rb:330:inprocess’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:41:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:168:inprocess_request’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:143:in
process_each_request!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:109:inwith_signal_handler’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:142:in
process_each_request!' /usr/lib/ruby/1.8/fcgi.rb:600:ineach_cgi’
/usr/lib/ruby/1.8/fcgi.rb:597:in each' /usr/lib/ruby/1.8/fcgi.rb:597:ineach_cgi’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:141:in
process_each_request!' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:55:inprocess!’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/fcgi_handler.rb:25:in
`process!’
dispatch.fcgi:24

I haven’t been able to figure out what’s going on. Anyone have any
ideas?

Hey brien,
even i am not sure here,
but i guess just you can try this,
try change the path of your /tmp/mysql.sock’ (2))
(i assume that user who creates /tmp/mysql.sock in production mode has
write permission)

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