jruby 上的 Authlogic 版本 2.1.6 出现错误
我在使用 jruby1.6.6 时遇到 authlogic 版本 2.1.6 错误 运行在 Ruby 1.9 上。
以下是错误的堆栈跟踪::
无法解析第 17 行第 13 列的 YAML Psych::SyntaxError(:无法解析第 17 行列的 YAML 13): org/jruby/ext/psych/PsychParser.java:270:in 解析' /usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych.rb:148:in
parse_stream' /usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych.rb:119:in 解析' /usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych.rb:106:in
加载' org/jruby/RubyBasicObject.java:1700:in __send__' org/jruby/RubyKernel.java:2099:in
发送' org/jruby/RubyArray.java:1614:in each' authlogic (2.1.6) lib/authlogic/i18n/translator.rb:8:in
翻译' authlogic (2.1.6) lib/authlogic/i18n.rb:78:in `translate'
任何关于此的指针都会有帮助
I am getting an error with authlogic version 2.1.6 with jruby1.6.6
running on ruby 1.9.
Following is the stacktrace of the error:
: couldn't parse YAML at line 17 column 13
Psych::SyntaxError (: couldn't parse YAML at line 17 column
13):
org/jruby/ext/psych/PsychParser.java:270:in parse'
parse_stream'
/usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych.rb:148:in
/usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych.rb:119:in parse'
load'
/usr/local/rvm/rubies/jruby-1.6.6/lib/ruby/1.9/psych.rb:106:in
org/jruby/RubyBasicObject.java:1700:in __send__'
send'
org/jruby/RubyKernel.java:2099:in
org/jruby/RubyArray.java:1614:in each'
translate'
authlogic (2.1.6) lib/authlogic/i18n/translator.rb:8:in
authlogic (2.1.6) lib/authlogic/i18n.rb:78:in `translate'
Any Pointers on this would be helpful
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
已有相关报道(例如,http://bugs.jruby.org/6415)。问题在于编码。虽然根本原因仍未解决,但您很可能可以通过在输入上强制使用 UTF-8 编码来解决您的特定问题。也就是说,
希望这有帮助。
There have been reports of this (e.g., http://bugs.jruby.org/6415). The problem is that of encoding. While the root cause is still unresolved, most likely you can get around your particular problem by enforcing UTF-8 encoding on the input. That is,
Hope this helps.