0

Why am I not allow to rake my seeds.rb file when I have the following ± character somewhere in my code?

Example:

:product_name => 'lenovo G570 NoteBook 15.6" 3GB Memory DDR3 500GB HDD DVD±R/RW'

While its running I suddenly get:

Invalid multibyte char (US-ASCII)
...3GB Memory DDR3 500GB HDD DVD┬▒R/RW',
... 

Taking away the character solves everything, I even can add it normally in my application and it ends up in the database with all characters and no problems.

Why is this?

Thank you.

LearningRoR
  • 26,582
  • 22
  • 85
  • 150

1 Answers1

3

Seems to me that you should ensure that seeds.rb is saved with the correct encoding. Presumably UTF-8. Also check out this answer.

Community
  • 1
  • 1
Jonas Elfström
  • 30,834
  • 6
  • 70
  • 106