rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: nreckart <nreckart@gmail.com>
To: Rack Development <rack-devel@googlegroups.com>
Subject: Dispatcher failed to catch: undefined method `read' for class  `FCGI::Stream' (NameError)
Date: Thu, 23 Jul 2009 13:05:20 -0700 (PDT)	[thread overview]
Message-ID: <f60dbdc9-725b-4807-a92b-8905f4bdc93f@o32g2000yqm.googlegroups.com> (raw)


I have a Rails site hosted on Bluehost, which recently upgraded to
Rails 2.3.3. When they did so, it broke my site, which was frozen to
Rails 2.3.2. In my fastcgi.crash.log I found the following.

[23/Jul/2009:10:00:28 :: 23983] Dispatcher failed to catch: undefined
method `read' for class `FCGI::Stream' (NameError)  /usr/lib/ruby/
gems/
1.8/gems/rack-1.0.0/lib/rack/handler/fastcgi.rb:7
  /home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb:
103:in `process_request'  /home/username/rails/app/vendor/rails/
railties/lib/fcgi_handler.rb:153:in `with_signal_handler'
  /home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb:
101:in `process_request'
  /home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb:
78:in `process_each_request'
  /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:117:in
`session'  /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:104:in
`each_request'
  /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:36:in `each'
  /home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb:
77:in `process_each_request'
  /home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb:
76:in `catch'  /home/username/rails/app/vendor/rails/railties/lib/
fcgi_handler.rb:76:in `process_each_request'
  /home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb:
51:in `process!'
  /home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb:
23:in `process!'
  dispatch.fcgi:24
unhandled dispatch error

To fix the problem, I installed the rack gem locally on my Bluehost
account. I then edited the rack-1.0.0/lib/rack/handler/fastcgi.rb file
and moved line 7, which aliases the read method, to after the read
method definition instead of before it. All was well with the world
again after I told my rails app to use the local gem instead of the
global system gem.

I'd be happy to submit a patch if needed.

             reply	other threads:[~2009-07-23 21:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-23 20:05 nreckart [this message]
2009-07-24 13:18 ` Dispatcher failed to catch: undefined method `read' for class `FCGI::Stream' (NameError) Nathan Reckart
2009-07-26 23:05   ` Hongli Lai
2009-07-27 14:10     ` nreckart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f60dbdc9-725b-4807-a92b-8905f4bdc93f@o32g2000yqm.googlegroups.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).