0

So, I updated my Ruby to 1.9.2, followed this:

  • Make sure 'config.encoding = "utf-8"' is there in application.rb file.
  • Make sure you are using 'mysql2' gem
  • Putting '# encoding: utf-8' on top of rake file.
  • Above 'Starter::Application.initialize!' line in environment.rb file, add following two lines:
    • Encoding.default_external = Encoding::UTF_8
    • Encoding.default_internal = Encoding::UTF_8

and now all my Ruby code is working right, but my assets/javascript/application.js is loaded only with this code:

throw Error("Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8")

how can i define assets encoding?

ps.: i didn't try to precompile yet, this is happening on development mode

1 Answer 1

1

Read the answer to this question. Sounds like it's the same issue you're looking at. It sounds like the solution is to open the .js file with a text editor and save it as UTF-8 encoding.

Sign up to request clarification or add additional context in comments.

4 Comments

i figured out what was causing, it was the ckeditor "//= require ckeditor/ckeditor" but i still need to use the ckeditor
I think that should be fine. Again, try opening the .js file with a basic text editor (like TextMate), and then specifying the encoding to be UTF-8 and saving it back out again.
saving as UTF-8 wasn't enought, i had to change somethings on the gem .js file, posted as an issue github.com/galetahub/ckeditor/issues/81
Well I'm glad you were able to solve it. Sorry I couldn't be of more help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.