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

Rogerio Chaves
  • 2,719
  • 2
  • 25
  • 24

1 Answers1

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.

Community
  • 1
  • 1
Batkins
  • 5,547
  • 1
  • 28
  • 27
  • i figured out what was causing, it was the ckeditor "//= require ckeditor/ckeditor" but i still need to use the ckeditor – Rogerio Chaves Feb 02 '12 at 19:20
  • 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. – Batkins Feb 02 '12 at 19:22
  • saving as UTF-8 wasn't enought, i had to change somethings on the gem .js file, posted as an issue https://github.com/galetahub/ckeditor/issues/81 – Rogerio Chaves Feb 03 '12 at 12:11
  • Well I'm glad you were able to solve it. Sorry I couldn't be of more help. – Batkins Feb 03 '12 at 14:31