Forum: Ruby on Rails Wrong Content-type in RJS with Gettext

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jacek Becela (Guest)
on 2006-05-30 16:42
Hello,

I am developing an application using Rails and doing l10n with
ruby-gettext.
When I deploy the app on lighttpd, every rjs template is rendered with
Content-type: text/html; charset: UTF-8. I believe it comes from 85th
line of
rails.rb script in ruby-gettext lib. RJS templates are not executed in
this situation.

Hovewer, when I run the app with Webrick, rjs templates are rendered
with: text/javascript; charset: UTF-8 (which is ok).

This strange difference in behaviour (Webrick vs. Lighty) of my app
occurs only when I use gettext. When I turn gettext off everything works
ok; rjs templates
are rendered on both servers with proper Content-type.

I reproduced this behaviour on a blank test app so it doesn't depends
on my code.


I use EdgeRails (rev:4380), lighty: 1.4.11, gettext gem 1.5.0.

Can you tell me what's wrong here?

Best regards,
--
Jacek Becela
Masao M. (Guest)
on 2006-05-30 17:27
(Received via mailing list)
Hi,

Could you send me your "blank test app" and
tell me how to set up lighttpd ?
# I don't know lighttpd well.

On Tue, 30 May 2006 14:42:58 +0200
Masao M. (Guest)
on 2006-06-03 09:12
(Received via mailing list)
Hi,

I setup lighttpd and test his sample application
but it works correctly.
# It returns "Content-Type: text/javascript; charset=UTF-8".

If someone have same trouble, report it to me, please.

On Tue, 30 May 2006 22:26:06 +0900
This topic is locked and can not be replied to.