Ruby on Rails 3, incompatible character encodings: UTF-8 and ASCII-8BIT with i18n

后端 未结 5 1381
再見小時候
再見小時候 2020-12-02 10:36

I\'ve got some troubles with the couple Rails 3.0.1, Ruby 1.9.2 and my website localization.

The problem is quite simple, i\'ve got something like that in a view :

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-02 11:28

    Make sure you have config.encoding = "utf-8" in your config/application.rb. Also, your example translation file doesn't match the key you're searching for (com_name and first_name) but I suppose that could just be a typo.

提交回复
热议问题