当我尝试在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"]
所有核心轨道宝石似乎都有这个问题,有什么想法吗?
答案 0 :(得分:6)
实际上,查理和我制定了修复方案,现在已经解决了。 https://github.com/jruby/jruby/commit/71bcb3941dcfe0e0d0217921b06ec66a421f2288
固定版本应于明天上午http://ci.jruby.org/snapshots/
提供答案 1 :(得分:1)
尝试在1.9模式下运行JRuby。 Yecht(旧的syck兼容的YAML引擎)没有正确解析Rails'(可能还有其他?)gemspec文件。 psych(新的,以1.9模式提供)应该处理这个罚款。由于MRI的syck似乎与gemspec有类似的问题,我怀疑MRI 1.8同样无法安装导轨。
例如:
$ 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
答案 2 :(得分:0)
固定在jruby-head;如果你正在使用rvm:
rvm install jruby-head