Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding error #1490

Closed
dexion opened this issue Jan 22, 2013 · 9 comments
Closed

Encoding error #1490

dexion opened this issue Jan 22, 2013 · 9 comments

Comments

@dexion
Copy link
Contributor

dexion commented Jan 22, 2013

Encoding::CompatibilityError in Rails_admin/main#dashboard

Showing /home/snake/.rvm/gems/ruby-1.9.3-p327@holidays/gems/rails_admin-0.3.0/app/views/rails_admin/main/_dashboard_history.html.haml where line #9 raised:

incompatible character encodings: UTF-8 and ASCII-8BIT
Extracted source (around line #9):

6: %th.changes= t("admin.table_headers.changes")
7: %tbody
8: - @history.each do |t|
9: - abstract_model = RailsAdmin.config(t.table).try(:abstract_model)
10: %tr
11: %td= t.try :username
12: - if o = abstract_model.try(:get, t.item)

@lakehouseru
Copy link

Have the same problem. All of my source code is written with UTF-8. I use mysql2 gem, so there is no problem with the older mysql adapter.

@lakehouseru
Copy link

And more details. This happened when I switched to the edge gem from github. Also I have checked the database - all of my columns are in UTF-8.

@lakehouseru
Copy link

I think this fix #1423 causes this issue.

@lakehouseru
Copy link

The only wayaround for this error is to roll back to rails_admin 0.2.0 gem. This is very frustraiting ((

@niksan
Copy link
Contributor

niksan commented Feb 1, 2013

I have same issue.

@lakehouseru
Copy link

Found other way to work with 4+ version - just to turn off the history in rails_admin.rb initializer by commenting this string

config.audit_with :history, 'User'

@tkawachi
Copy link

I encountered the same issue. Commenting config.audit_with out works for me.

@bobbdelsol
Copy link

I encountered the same issue. I wasn't using config.audit_with.

My solution was to not allow the fields I was using UTF-8 on to be displayed or edited. I used Javascript from the web console to change values in those fields by adding a method accessed via $.post.

@mshibuya
Copy link
Member

mshibuya commented Aug 8, 2021

Closing this since the history adapter is legacy and will be disused.
#3374

@mshibuya mshibuya closed this as completed Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants