Jruby 1.6.3 和 Rails 3.1 Coffeescript 错误
我无法让 CoffeeScript 在 jurby 1.6.3 中从 Rails 3.1 运行。
对 /assets/application.js
的 HTTP 请求失败,并出现 TypeError: can't conversion Hash into String。它在 MRI 1.9.2 下工作得很好
。我相信我已经将其范围缩小到以下内容:
ExecJS(咖啡脚本依赖项)的 external_runtime.rb 的第 141 行似乎是出现此 TypeError 的地方:
IO.popen(command, options) { |f| output = f.read }
浏览 jira.codehaus.org
我偶然发现 JRUBY-5532 已修复,但 Charles Nutter 指出其他 IO 调用会忽略编码选项,这让我想知道这是否是 JRuby 1.9 的 IO 问题 支持。
无论如何,我正在寻找解决方法、修复程序或任何其他可用信息来尝试使其进入工作状态。毕竟,没有痛苦就没有收获。
I cannot get coffeescript working from rails 3.1 in jurby 1.6.3.
HTTP requests for /assets/application.js
are failing with TypeError: can't convert Hash into String. It works fine under MRI 1.9.2.
After a bout of ruby-debug-ide debugging issues (I’m looking at you Exception in DebugThread loop: undefined method `is_binary_data?'); I believe I have it narrowed down to the following:
Line 141 of external_runtime.rb for ExecJS (a coffee-script dependency) appears to be where this TypeError is cropping up:
IO.popen(command, options) { |f| output = f.read }
Poking around jira.codehaus.org
I stumbled onto JRUBY-5532 which is fixed, but Charles Nutter noted that other IO calls ignore encoding options, which makes me wonder if this is an IO issue with JRuby’s 1.9 support.
Regardless, I’m looking for a workaround, fix, or any other information available to try and get this to a working state. After all, no pain – no gain.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论