$> jruby -v
jruby 1.1.4(ruby 1.8.6 patchlevel 114)(2008-08-28 rev 7570)[x86-java]
$> gem install rspec
JRuby限制openss加载。 gem install jruby-openssl获得全力支持。
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
成功安装了rspec-1.1.12
1个宝石安装
安装rspec-1.1.12 ...的ri文档
安装rspec-1.1.12 ...
$> spec --help
... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:578:在`report_activate_error'中:找不到RubyGem黄瓜(> = 0.1.13)(Gem :: LoadError )
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:134:in activate'
activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:158: in
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:157:in each
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:157:in activate'
gem'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:49: in
来自... / jruby / 1.1.4 / bin / spec:18
$>宝石安装黄瓜
(已安装黄瓜-0.1.16和依赖项term-ansicolor-1.0.3,polyglot-0.2.5,treettop-1.2.4,diff-lcs-1.1.2)
$> spec --help
... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:578:在`report_activate_error'中:找不到RubyGem hoe(> = 1.8.0)(Gem :: LoadError) )
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:134:in activate'
activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:158: in
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:157:in each'
activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: in
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:158:in activate'
每个'
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:157:in
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: inactivate'
activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:158: in
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:157:in each'
activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: in
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:158:in activate'
每个'
from ... / jruby / 1.1.4 / lib / ruby / site_ruby / 1.8 / rubygems.rb:157:in
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: inactivate'
gem'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:49: in
来自... / jruby / 1.1.4 / bin / spec:18
$> gem install hoe
(安装了hoe-1.10.0和依赖rubyforge-1.0.3)
$> spec --help
用法:spec(FILE | DIRECTORY | GLOB)+ [options]
(等等等)
似乎“gem install rspec”不会安装依赖项 不确定它是否是Windows上的JRuby独有的......其他操作系统未经过测试。
答案 0 :(得分:4)
你有没有尝试过:
gem install rspec --development
答案 1 :(得分:0)
gem install rspec --include-dependencies有帮助吗?直到后来的Rubygems版本,它才是默认的,也许jruby不太适合鼻烟。
答案 2 :(得分:0)
使用JRuby trunk为我工作:
$ jruby -v
jruby 1.3.0 (ruby 1.8.6p287) (2009-03-15 r9415) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_07) [x86_64-java]
$ jruby -S gem install rspec
**************************************************
Thank you for installing rspec-1.2.2
Please be sure to read History.rdoc and Upgrade.rdoc
for useful information about this release.
**************************************************
Successfully installed rspec-1.2.2
1 gem installed
Installing ri documentation for rspec-1.2.2...
Installing RDoc documentation for rspec-1.2.2...
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
Could not find main page README.rdoc
$ jruby -S spec --help
Usage: spec (FILE|DIRECTORY|GLOB)+ [options]
...