enforce_available_locales不推荐使用的标签是什么意思

时间:2014-02-27 01:45:23

标签: ruby-on-rails cucumber

运行黄瓜测试时出现以下错误:

[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. 

这是什么意思以及它给出的关于跳过验证的建议?你为什么要这样做?

1 个答案:

答案 0 :(得分:0)

这是由于rails 4.0.2附带的i18n gem中的一个错误

解决方案是在 config / application.rb

中添加此行
config.i18n.enforce_available_locales = false

要么为i18n gem使用github存储库,如本文所述:Rails I18n validation deprecation warning, after setting enforce_available_locales = true

应该在将来的版本中修复

相关问题