Rails 3.2 关于 JRuby gemspec 错误

发布于 2024-12-23 15:50:26 字数 304 浏览 2 评论 0 原文

当我尝试在 JRuby 1.6.5 上安装 Rails 3.2 rc 1 时,收到此 gemspec 错误:

Invalid gemspec in[/Users/robin/.rvm/gems/jruby-1.6.5/specifications/railties-3.2.0.rc1.gemspec]:
Illformed requirement ["#<YAML::Yecht::DefaultKey:0x469c3554> 3.2.0.rc1"]

所有核心 Rails gem 似乎都有此问题,有什么想法吗?

When I try to install Rails 3.2 rc 1 on JRuby 1.6.5, I get this gemspec error:

Invalid gemspec in[/Users/robin/.rvm/gems/jruby-1.6.5/specifications/railties-3.2.0.rc1.gemspec]:
Illformed requirement ["#<YAML::Yecht::DefaultKey:0x469c3554> 3.2.0.rc1"]

All the core rails gems seem to have this problem, any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

慕烟庭风 2024-12-30 15:50:26

事实上,查理和我已经找到了解决办法,现在已经解决了。 https://github.com/jruby/jruby/commit/71bcb3941dcfe0e0d0217921b06ec66a421f2288

修复版本将于明天早上在 http://ci.jruby.org/snapshots/

Actually, Charlie and I worked out a fix and it is now resolved. https://github.com/jruby/jruby/commit/71bcb3941dcfe0e0d0217921b06ec66a421f2288

The fixed version should be available tomorrow morning at http://ci.jruby.org/snapshots/

一花一树开 2024-12-30 15:50:26

尝试在 1.9 模式下运行 JRuby。 Rails 的(可能还有其他的?)gemspec 文件没有被 yecht(旧的 syck 兼容的 YAML 引擎)正确解析。 psych(新的,在 1.9 模式下可用)应该可以很好地处理这个问题。由于 MRI 的 syck 似乎与 gemspec 有类似的问题,我怀疑 MRI 1.8 同样无法安装 Rails。

例如:

$ GEM_HOME=$HOME/gems GEM_PATH=$GEM_HOME jruby --1.9 -S gem install rails -v 3.2.0.rc1 
Fetching: i18n-0.6.0.gem (100%)
Fetching: multi_json-1.0.4.gem (100%)
Fetching: activesupport-3.2.0.rc1.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: activemodel-3.2.0.rc1.gem (100%)
Fetching: rack-1.3.6.gem (100%)
Fetching: rack-cache-1.1.gem (100%)
Fetching: rack-test-0.6.1.gem (100%)
Fetching: journey-1.0.0.rc4.gem (100%)
Fetching: hike-1.2.1.gem (100%)
Fetching: tilt-1.3.3.gem (100%)
Fetching: sprockets-2.1.2.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: actionpack-3.2.0.rc1.gem (100%)
Fetching: arel-3.0.0.rc1.gem (100%)
Fetching: tzinfo-0.3.31.gem (100%)
Fetching: activerecord-3.2.0.rc1.gem (100%)
Fetching: activeresource-3.2.0.rc1.gem (100%)
Fetching: mime-types-1.17.2.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.10.gem (100%)
Fetching: mail-2.3.0.gem (100%)
Fetching: actionmailer-3.2.0.rc1.gem (100%)
Fetching: rake-0.9.2.2.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: rack-ssl-1.3.2.gem (100%)
Fetching: json-1.6.4-java.gem (100%)
Fetching: rdoc-3.12.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.2.0.rc1.gem (100%)
Fetching: bundler-1.0.21.gem (100%)
Fetching: rails-3.2.0.rc1.gem (100%)
Successfully installed i18n-0.6.0
Successfully installed multi_json-1.0.4
Successfully installed activesupport-3.2.0.rc1
Successfully installed builder-3.0.0
Successfully installed activemodel-3.2.0.rc1
Successfully installed rack-1.3.6
Successfully installed rack-cache-1.1
Successfully installed rack-test-0.6.1
Successfully installed journey-1.0.0.rc4
Successfully installed hike-1.2.1
Successfully installed tilt-1.3.3
Successfully installed sprockets-2.1.2
Successfully installed erubis-2.7.0
Successfully installed actionpack-3.2.0.rc1
Successfully installed arel-3.0.0.rc1
Successfully installed tzinfo-0.3.31
Successfully installed activerecord-3.2.0.rc1
Successfully installed activeresource-3.2.0.rc1
Successfully installed mime-types-1.17.2
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed mail-2.3.0
Successfully installed actionmailer-3.2.0.rc1
Successfully installed rake-0.9.2.2
Successfully installed thor-0.14.6
Successfully installed rack-ssl-1.3.2
Successfully installed json-1.6.4-java
Successfully installed rdoc-3.12
Successfully installed railties-3.2.0.rc1
Successfully installed bundler-1.0.21
Successfully installed rails-3.2.0.rc1
31 gems installed

Try running JRuby in 1.9 mode. Rails' (and probably others?) gemspec file is not properly parsed by yecht(the old syck-compatible YAML engine). psych (the new one, available in 1.9 mode) should handle this fine. Since MRI's syck appears to have similar problem with the gemspec, I suspect MRI 1.8 similarly fails to install rails.

For example:

$ GEM_HOME=$HOME/gems GEM_PATH=$GEM_HOME jruby --1.9 -S gem install rails -v 3.2.0.rc1 
Fetching: i18n-0.6.0.gem (100%)
Fetching: multi_json-1.0.4.gem (100%)
Fetching: activesupport-3.2.0.rc1.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: activemodel-3.2.0.rc1.gem (100%)
Fetching: rack-1.3.6.gem (100%)
Fetching: rack-cache-1.1.gem (100%)
Fetching: rack-test-0.6.1.gem (100%)
Fetching: journey-1.0.0.rc4.gem (100%)
Fetching: hike-1.2.1.gem (100%)
Fetching: tilt-1.3.3.gem (100%)
Fetching: sprockets-2.1.2.gem (100%)
Fetching: erubis-2.7.0.gem (100%)
Fetching: actionpack-3.2.0.rc1.gem (100%)
Fetching: arel-3.0.0.rc1.gem (100%)
Fetching: tzinfo-0.3.31.gem (100%)
Fetching: activerecord-3.2.0.rc1.gem (100%)
Fetching: activeresource-3.2.0.rc1.gem (100%)
Fetching: mime-types-1.17.2.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.10.gem (100%)
Fetching: mail-2.3.0.gem (100%)
Fetching: actionmailer-3.2.0.rc1.gem (100%)
Fetching: rake-0.9.2.2.gem (100%)
Fetching: thor-0.14.6.gem (100%)
Fetching: rack-ssl-1.3.2.gem (100%)
Fetching: json-1.6.4-java.gem (100%)
Fetching: rdoc-3.12.gem (100%)
Depending on your version of ruby, you may need to install ruby rdoc/ri data:

<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!
Fetching: railties-3.2.0.rc1.gem (100%)
Fetching: bundler-1.0.21.gem (100%)
Fetching: rails-3.2.0.rc1.gem (100%)
Successfully installed i18n-0.6.0
Successfully installed multi_json-1.0.4
Successfully installed activesupport-3.2.0.rc1
Successfully installed builder-3.0.0
Successfully installed activemodel-3.2.0.rc1
Successfully installed rack-1.3.6
Successfully installed rack-cache-1.1
Successfully installed rack-test-0.6.1
Successfully installed journey-1.0.0.rc4
Successfully installed hike-1.2.1
Successfully installed tilt-1.3.3
Successfully installed sprockets-2.1.2
Successfully installed erubis-2.7.0
Successfully installed actionpack-3.2.0.rc1
Successfully installed arel-3.0.0.rc1
Successfully installed tzinfo-0.3.31
Successfully installed activerecord-3.2.0.rc1
Successfully installed activeresource-3.2.0.rc1
Successfully installed mime-types-1.17.2
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.10
Successfully installed mail-2.3.0
Successfully installed actionmailer-3.2.0.rc1
Successfully installed rake-0.9.2.2
Successfully installed thor-0.14.6
Successfully installed rack-ssl-1.3.2
Successfully installed json-1.6.4-java
Successfully installed rdoc-3.12
Successfully installed railties-3.2.0.rc1
Successfully installed bundler-1.0.21
Successfully installed rails-3.2.0.rc1
31 gems installed
节枝 2024-12-30 15:50:26

固定在红宝石头中;如果您使用的是rvm:

rvm install jruby-head

Fixed in jruby-head; if you're using rvm:

rvm install jruby-head
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文