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::UndefinedConversionError - "\xC2" from ASCII-8BIT to UTF-8: #136

Open
sanchojaf opened this issue Dec 14, 2014 · 2 comments
Open

Comments

@sanchojaf
Copy link

Hi, I have the error when I do rails s

Encoding::UndefinedConversionError - "\xC2" from ASCII-8BIT to UTF-8:

when I am trying use deface for override rails_admin.

rake deface:precompile work fine.

my_override.rb test

Deface::Override.new(:virtual_path => "rails_admin/main/index",
:name => "example-1",
:replace => "li.dropdown",
:text => "

  • New Post
  • ")

    https://gist.github.com/sanchojaf/bff0712fdadac408518f

    gem 'rails_admin','0.6.5'
    gem 'deface', '~> 1.0.0'

    the line that is trying to compile is 94:
    in

    https://github.com/sferik/rails_admin/blob/01d2bd884a3b536ea3dac41202b4f23f69ed9cb6/app/views/rails_admin/main/index.html.haml

    = "#list td.#{property.css_class} { max-width: #{property.column_width}px; }"

    Complete Gemfile
    source 'https://rubygems.org'
    ruby '2.1.2'
    gem 'rails', '4.1.4'
    gem 'sass-rails', '> 4.0.3'
    gem 'uglifier', '>= 1.3.0'
    gem 'coffee-rails', '
    > 4.0.0'
    gem 'jquery-rails'
    gem 'turbolinks'
    gem 'jbuilder', '> 2.0'
    gem 'sdoc', '
    > 0.4.0', group: :doc
    gem 'spring', group: :development
    gem 'bootstrap-sass'
    gem 'devise','3.3.0'
    gem 'wicked'
    gem 'rails_admin','0.6.5'
    gem 'deface', '> 1.0.0'
    gem 'ffaker'
    gem 'chartkick'
    gem 'therubyracer'
    gem 'haml'
    gem 'bootstrap3-datetimepicker-rails', '
    > 3.1.3'
    gem 'awesome_nested_set'
    gem 'acts_as_list'

    group :development do
    gem 'better_errors'
    gem 'binding_of_caller', :platforms=>[:mri_21]
    gem 'quiet_assets'
    gem 'rails_layout'
    gem 'sqlite3'
    end
    group :production do
    gem 'thin'
    gem 'rails_12factor'
    gem 'pg'
    end

    @Em-AK
    Copy link

    Em-AK commented Jun 5, 2015

    I have the same problem. Did you find a workaround ?

    @adarsh
    Copy link

    adarsh commented Nov 20, 2015

    Maybe try calling .force_encoding('UTF-8') on the string in question to coerce it.

    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

    3 participants