Ruby on Rails Wednesday, November 19, 2014

Hi,
I have problem with showing some string in my site with Rails 4
I get this message:
incompatible character encodings: ASCII-8BIT and UTF-8

concerning this html sequence in an erb file:
<h3><%= MyString.to_s.force_encoding("UTF-8") %></h3>

I get this problem only on production server, but I do not have the problem on my local computer
What can I do with this problem


regards,

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/217f5775-1225-4759-84d5-b9a0d381aed3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment