Hi!

Try to follow Jefrey tip. Because he said that mysql adapter returns
ASCII-8bit.

You must use

adapter: mysql2

Regards,
Everaldo
On Tue, Feb 7, 2012 at 9:10 PM, Felipe Pieretti Umpierre wrote:

Ok, I put the encoding: utf8

development:
adapter: mysql
encoding: utf8
database: mailler_development
reconect: false
username: mailler
password:
pool: 5
timeout: 5000

so my list.html.erb when I have this line of code

<td><%= g.description.force_encoding( "utf-8" ) %></td>

so this was the text

Novamente, nenhuma descrição

But when I change, <td><%= g.description %></td>, shows again the error

incompatible character encodings: UTF-8 and ASCII-8BIT

Extracted source (around line #16):

13: <tr style="background-color: <%= cycle( "#EEE", "#DDD" ) %>">
14: <td><%= g.id %></td>
15: <td><%= g.name %></td>
16: <td><%= g.description %></td>
17: <td>
18: <%= link_to "Editar", { :action => "edit", :id => g.id } %>
<br />
19: <%= link_to "Deletar", { :action => "destroy", :id => g.id
}, :class => "delete", :confirm => "Tem certeza que deseja deletar
'#{g.name}' ?" %>


Thank you

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 11 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 7, '12 at 2:21a
activeFeb 14, '12 at 12:59a
posts11
users3
websiterubyonrails.org
irc#RubyOnRails

People

Translate

site design / logo © 2021 Grokbase