[英]JRuby on rails encoding error
Yesterday I tried to switch from MRI to JRuby and I believe that i got all the gems right. 昨天,我试图从MRI切换到JRuby,我相信所有的宝石都对。
I am using Mongoid and not ActiveRecord so no switching of gem necessary there I think. 我使用的是Mongoid,而不是ActiveRecord,因此我认为无需切换gem。
The error I get is: 我得到的错误是:
incompatible character encodings: UTF-8 and ASCII-8BIT
The Full trace can be shown here: https://gist.github.com/1305847 完整的跟踪信息可以在这里显示: https : //gist.github.com/1305847
And my Gemfile can be shown here: https://gist.github.com/1305882 我的Gemfile可以显示在这里: https ://gist.github.com/1305882
Does anyone have a clue to what the solution might be? 有谁知道解决方案可能是什么?
It turns out there was a problem with jruby 1.6.4. 事实证明,jruby 1.6.4存在问题。 After upgrading to 1.6.5 it works fine. 升级到1.6.5后,它可以正常工作。
Try with running JRuby in 1.9 mode: 尝试以1.9模式运行JRuby:
$ jruby --1.9 rails s
You can also $ export JRUBY_OPTS=--1.9
您也可以$ export JRUBY_OPTS=--1.9
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.