【发布时间】:2011-10-31 07:36:14
【问题描述】:
我正在将 Rails 2.3.8 应用程序(在 ruby 1.8.7 上)从 MySQL 转换为 Postgres 9.x,虽然它在开发模式下似乎一切正常,但我的所有测试(标准单元和功能测试) yml 固定装置)立即出现错误消息:
test_mytest_name(my_thing_im_testing):
PGError: incomplete multibyte character
/usr/local/lib/ruby/1.8/erb.rb:719:in `inject'
用于测试的database.yml是:
test:
adapter: postgresql
encoding: utf8
database: ir_test
username: postgres
password: password
我怀疑问题在于加载 yml 固定装置。我已经确认它们被保存为 utf-8(通过 Textmate),但没有运气。
【问题讨论】:
标签: ruby-on-rails postgresql encoding