Re: Upgrading from

Mat Schaffer <[email protected]> Fri, 15 Sep 2006 13:27:19 -0400
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
On Sep 15, 2006, at 11:50 AM, Ben Gribaudo wrote:

> Having more time to investigate this today, I confirmed a suspicion  
> that adding an Apache "AddType text/html .rhtml" directive would  
> fix the problem.
>
> Any ideas as to what changed during the upgrade to require this  
> previously unnecessary directive?? Is the need for this instruction  
> something that should be documented on the Wiki?
>
> Ben
>
> Ben Gribaudo wrote:
>> After upgrading a development server from Ubuntu 5.10 to 6.06  
>> (using apt-get distro-upgrade), Apache started returning our rhtml  
>> pages with a content type of application/x-httpd-eruby (instead of  
>> text/html as it did before the upgrade). mod_ruby returns  
>> application/x-httpd-eruby. This causes web browsers to show a "Do  
>> you want to download this file and  open it or save it?" dialog  
>> box instead of displaying the page. The content returned in the  
>> file has been parsed by eruby--all Ruby code has been processed  
>> and appropriate HTML has been outputted.
>

My cursory googling has led me to believe that "AddType application/x- 
httpd-eruby .rhtml" would be correct.  http://www.rubycentral.com/ 
book/web.html

Did the upgrade change something in your httpd.conf that's maybe  
causing apache's mimetype to carry into the output's mimetype?

NB: I have no personal experience with this problem.  Just trying to  
help you think through it.
-Mat