From: Sean Chittenden Date: 2002-01-08T13:03:58+09:00 Subject: Re: eruby only generates text/plain > You're right. The error disappeared. But I still have problems > generating html-pages. Even this simple script is displayed as > text/plain. > > <% > puts "

Hello, world!

" > %> > > Eruby always sends "Content-Type: text/plain". I copies the config > from mod_ruby's examples directory into my apache config. I even > tried the configuration guide from the "Programming Ruby" book. Both > ways failed. I'm stuck. This could be one of two things: If you're seeing (verbatum) <% puts "blah" %>, then you need something like the following in your htpd.conf: SetHandler ruby-object RubyHandler Apache::ERubyRun.instance If you're seeing just "blah", then for some reason ERuby isn't setting the mime-type correctly which is _very_ strange because I've never had that happen before. If worse comes to worse, you can change the default mime type to text/html (don't recommend that), or you can create an apache request instance and change the ontent type that way (also don't recommend, but it's better than changing the default, IMHO). <% r = Apache.request r.content_type = 'text/html' %> I hope it's the 1st of the two probs though (the latter strikes me as an exotic bug in MIME land). -sc -- Sean Chittenden