From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.204.72.79 with SMTP id l15cs398636bkj; Fri, 24 Jul 2009 09:30:07 -0700 (PDT) Received-SPF: pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.151.103.19 as permitted sender) client-ip=10.151.103.19; Authentication-Results: mr.google.com; spf=pass (google.com: domain of grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com designates 10.151.103.19 as permitted sender) smtp.mail=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com; dkim=pass header.i=grbounce-ceibQwUAAAB4YPBqaDIjI2bFOCxyyh3G=chneukirchen=gmail.com@googlegroups.com Received: from mr.google.com ([10.151.103.19]) by 10.151.103.19 with SMTP id f19mr6843492ybm.0.1248453005985 (num_hops = 1); Fri, 24 Jul 2009 09:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :received:received:received-spf:authentication-results:received :dkim-signature:domainkey-signature:mime-version:content-type :content-transfer-encoding:received:in-reply-to:references:date :message-id:subject:from:to:x-google-approved:reply-to:sender :precedence:x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=mT1bagAhYQoWGEyxUqv8UvOHkRAbUW7vGa3IF24bPEA=; b=QcK0YuF65WrM33dLcNhi+ggRKilbIcwZenBu2vkH5P3MajZ0awOpovefpbVeSC6aEo 3UIYbhnoe8Er+XmXWCxcl+ofcb9SzaCACAF8pN62Beav4BFL90ah8uWgUjCXb1IkMAff UcJwf/AINuzZel/VeceXp+plAnZM0xaBRrp7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:received-spf:authentication-results :dkim-signature:domainkey-signature:mime-version:content-type :content-transfer-encoding:in-reply-to:references:date:message-id :subject:from:to:x-google-approved:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; b=Y2VQKzIflqqsflmQR7Hvz43Qe5PuYfnno/vW+SrE7MCE9vr1vKWxqf7UfWp+e5Ta9w +HVRVmmLbP+dvAJlAqBCWHRdek3P9kfuXs6MH7h3vIXoLu/bBkUY1ds/htFmpYB8zPwj L4ZBb2o0pkgcCNiO2z+nWA9sdlhExCW8KmIv4= Received: by 10.151.103.19 with SMTP id f19mr1042445ybm.0.1248453005640; Fri, 24 Jul 2009 09:30:05 -0700 (PDT) Received: by 10.176.92.3 with SMTP id p3gr1518yqb.0; Fri, 24 Jul 2009 09:29:55 -0700 (PDT) X-Sender: nreckart@gmail.com X-Apparently-To: rack-devel@googlegroups.com Received: by 10.90.73.17 with SMTP id v17mr3102637aga.3.1248441496646; Fri, 24 Jul 2009 06:18:16 -0700 (PDT) Return-Path: Received: from mail-yx0-f177.google.com (mail-yx0-f177.google.com [209.85.210.177]) by gmr-mx.google.com with ESMTP id 21si209263yxe.12.2009.07.24.06.18.15; Fri, 24 Jul 2009 06:18:15 -0700 (PDT) Received-SPF: pass (google.com: domain of nreckart@gmail.com designates 209.85.210.177 as permitted sender) client-ip=209.85.210.177; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of nreckart@gmail.com designates 209.85.210.177 as permitted sender) smtp.mail=nreckart@gmail.com; dkim=pass (test mode) header.i=@gmail.com Received: by mail-yx0-f177.google.com with SMTP id 7so2798548yxe.16 for ; Fri, 24 Jul 2009 06:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=geRPTcLUNRtg3/IN/FwkZ4bdwAh+z3LUZdQbFVmX04M=; b=SfDHr/y/hC/OFcUSirawOjc0hEHngiYZFGthrqe6ziwTs1UExSUTDex+GXg69nBVNR sbGd92mgeExJGOqzdkDNkU8r7gmTias9/gQobr5Ib+a3p8UmD7HMTZHhesGaIHDWi1PC I+sZt595hZ/Ha7JOQypY7i2OGuky8pszSNE0U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=LrGoFqiGrAy8fUXPHbsAZpHl2wzwGwmXyYET11a+JtAkBru0ja3pWNPGU5kJugjv3k pd0LeJfbDUQMTSydiAsJ4nIl5MKhJAqDY5mZJtNYmGguNVuLUQVX25H7TA9SkuFT+TEz ZSKBbO/fjdXZTCIH8VLU52VUxhYap1CRtoCTc= Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Received: by 10.90.78.14 with SMTP id a14mr2893801agb.41.1248441495558; Fri, 24 Jul 2009 06:18:15 -0700 (PDT) In-Reply-To: References: Date: Fri, 24 Jul 2009 09:18:15 -0400 Message-ID: <8606b3eb0907240618s6f0515fbu7c052debbf882a95@mail.gmail.com> Subject: Re: Dispatcher failed to catch: undefined method `read' for class `FCGI::Stream' (NameError) From: Nathan Reckart To: Rack Development X-Google-Approved: kenneth.kalmer@gmail.com via web at 2009-07-24 16:29:54 Reply-To: rack-devel@googlegroups.com Sender: rack-devel@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list rack-devel@googlegroups.com; contact rack-devel+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: rack-devel@googlegroups.com X-BeenThere: rack-devel@googlegroups.com Below is the patch that I used to fix the issue. Sorry if this the preferred method for submitting patches. ---------------------------------------------------------------------------= --------------------- diff --git a/lib/rack/handler/fastcgi.rb b/lib/rack/handler/fastcgi.rb index 11e1fca..83cbd83 100644 --- a/lib/rack/handler/fastcgi.rb +++ b/lib/rack/handler/fastcgi.rb @@ -4,13 +4,13 @@ require 'rack/content_length' require 'rack/rewindable_input' class FCGI::Stream - alias _rack_read_without_buffer read - def read(n, buffer=3Dnil) buf =3D _rack_read_without_buffer n buffer.replace(buf.to_s) if buffer buf end + + alias _rack_read_without_buffer read end module Rack ---------------------------------------------------------------------------= --------------------- On Thu, Jul 23, 2009 at 4:05 PM, nreckart wrote: > 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) =A0/usr/lib/ruby/ > gems/ > 1.8/gems/rack-1.0.0/lib/rack/handler/fastcgi.rb:7 > =A0/home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb: > 103:in `process_request' =A0/home/username/rails/app/vendor/rails/ > railties/lib/fcgi_handler.rb:153:in `with_signal_handler' > =A0/home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb: > 101:in `process_request' > =A0/home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb: > 78:in `process_each_request' > =A0/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:117:in > `session' =A0/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:104:in > `each_request' > =A0/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:36:in `each' > =A0/home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb: > 77:in `process_each_request' > =A0/home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb: > 76:in `catch' =A0/home/username/rails/app/vendor/rails/railties/lib/ > fcgi_handler.rb:76:in `process_each_request' > =A0/home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb: > 51:in `process!' > =A0/home/username/rails/app/vendor/rails/railties/lib/fcgi_handler.rb: > 23:in `process!' > =A0dispatch.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.