# One page in app keeps rendering as text/plain

**URL:** <https://www.ruby-forum.com/t/one-page-in-app-keeps-rendering-as-text-plain/87162>\
**Category:** Rails\
**Created:** [February 28, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/one-page-in-app-keeps-rendering-as-text-plain/87162 "2007-02-28T17:08:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/b77776/32.png) [@Zeff](https://www.ruby-forum.com/u/Zeff)\
**Post date:** [February 28, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/one-page-in-app-keeps-rendering-as-text-plain/87162/1 "2007-02-28T17:08:05Z")

</div>

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/1.3.26.1a  
mod\_auth\_passthrough/1.8 mod\_log\_bytes/1.2 mod\_bwlimited/1.4 PHP/4.4.4  
FrontPage/5.0.2.2635.SR1.2 mod\_ssl/2  
.8.28 OpenSSL/0.9.7a  
#\<#\<Class: 0x2a96d0b978\>:0x2a96d0b928\>Content-Type: text/html;  
charset=utf-8  
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”  
end

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!

Zeff

---

<div class="post-metadata">

**Author:** ![Zeff](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/b77776/32.png) [@Zeff](https://www.ruby-forum.com/u/Zeff)\
**Post date:** [March 2, 2007, 4:02pm UTC](https://www.ruby-forum.com/t/one-page-in-app-keeps-rendering-as-text-plain/87162/2 "2007-03-02T16:02:33Z")

</div>

I found this ticket on the subject, but don’t understand how the added  
‘output.write’ fixes the issue. Can anyone elaborate?

Thanks,

Zeff

[http://dev.rubyonrails.org/ticket/3703](http://dev.rubyonrails.org/ticket/3703)
