Forum: Ruby on Rails One page in app keeps rendering as text/plain

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
8c66dc72416bd3537bf00cc297b0b226?d=identicon&s=25 Zeff (Guest)
on 2007-02-28 17:08
(Received via mailing list)
Here's what I get from wget -S:

HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Wed, 28 Feb 2007 15:52:06 GMT
  Server: Apache/1.3.37 (Unix) mod_fastcgi/2.4.2 mod_gzip/
mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.4
FrontPage/ mod_ssl/2
.8.28 OpenSSL/0.9.7a
  #<#<Class: 0x2a96d0b978>:0x2a96d0b928>Content-Type: text/html;
  Set-Cookie: _session_id=f160e8bb2ec0797e1ffca85e125d15f4; path=/
  Cache-Control: no-cache
  Connection: close
  Content-Type: text/plain
Length: unspecified [text/plain]

[ <=>
23,615        --.--K/s

10:52:10 ( 15.75 MB/s) - `registration' saved [23615]

I've even set an after_filter in application.rb to force the header
type like so:

  after_filter :set_charset

  def set_charset
    @headers["Content-Type"] = "text/html; charset=utf-8"

All of my other pages render just fine ... but this is the only one I
use a little RJS with.  Is that related?  And any idea on the '
#<#<Class: 0x2a96d0b978>:0x2a96d0b928>Content-Type: text/html;
charset=utf-8' line showing up?  Looks like an object reference ...
possibly being forced in with my set_charset method.

Any help would be GREATLY appreciated.

Thank you!

8c66dc72416bd3537bf00cc297b0b226?d=identicon&s=25 Zeff (Guest)
on 2007-03-02 16:02
(Received via mailing list)
I found this ticket on the subject, but don't understand how the added
'output.write' fixes the issue.  Can anyone elaborate?


This topic is locked and can not be replied to.