invalid byte sequence in US-ASCII (Ruby 1.9 + rails 2.3.8 + mongodb + mongo_mapper)

后端 未结 6 2196
小蘑菇
小蘑菇 2021-02-04 07:40

My setup is:

linux + Ruby 1.9 + rails 2.3.8 + mongodb + mongo_mapper

I followed http://railscasts.com/episodes/194-mongodb-and-mongomapper, that everything is OK

6条回答
  •  感动是毒
    2021-02-04 08:03

    Please add the following lines in your environment.rb .

    Encoding.default_external = Encoding::UTF_8
    Encoding.default_internal = Encoding::UTF_8
    

    The problem will be solved.

提交回复
热议问题