1

$> jruby -v

jruby 1.1.4(ruby 1.8.6 补丁级别 114)(2008-08-28 rev 7570)[x86-java]

$> 宝石安装 rspec

JRuby 有限的 openss 已加载。gem install jruby-openssl 以获得全面支持。
http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL
成功安装 rspec-1.1.12
1 个 gem 安装rspec-1.1.12
安装 ri 文档... rspec-1.1.12
安装 RDoc 文档...

$> 规范--帮助

.../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `report_activate_error': 找不到 RubyGem 黄瓜 (>= 0.1.13) (Gem::LoadError)

来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:134:在激活中' 来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb :157: 来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: 在gem' 来自 .../jruby/1.1.4/bin/spec:18activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:158: in

each
activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:49: in

$> gem 安装黄瓜

(安装了 cucumber-0.1.16 和依赖项 term-ansicolor-1.0.3、polyglot-0.2.5、treettop-1.2.4、diff-lcs-1.1.2)

$> 规范--帮助

.../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:578:in `report_activate_error': 找不到 RubyGem 锄头 (>= 1.8.0) (Gem::LoadError)

来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:134:在激活中' 来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb :157: 在激活中 来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:158: 在每个中 来自 .../jruby/1.1.4/lib/ruby/site_ruby /1.8/rubygems.rb:157:在激活中 来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157:在激活中 来自 .../jruby/1.1.4 /lib/ruby/site_ruby/1.8/rubygems.rb:158: 在每个' 中来自 .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: 在gem' 中来自 ... /jruby/1.1.4/bin/spec:18 activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:158: in

each'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: in

activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: in

activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:158: in

each'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: in

activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:157: in

activate'
from .../jruby/1.1.4/lib/ruby/site_ruby/1.8/rubygems.rb:49: in

$> gem 安装锄头

(安装了 hoe-1.10.0 和依赖 ruby​​forge-1.0.3)

$> 规范--帮助

用法:spec (FILE|DIRECTORY|GLOB)+ [options]
(etc., etc., etc.)

似乎“gem install rspec”没有安装依赖项。
不确定它是否是 Windows 上的 JRuby 独有的……其他操作系统未测试。

4

3 回答 3

4

你试过了吗:

宝石安装 rspec --development

于 2009-04-14T17:50:21.633 回答
0

gem install rspec --include-dependencies 有帮助吗?直到更高版本的 Rubygems 才默认设置,也许 jruby 还不能满足要求。

于 2009-03-15T16:53:53.997 回答
0

适用于我的 JRuby 主干:

$ 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]
   ...
于 2009-03-24T18:32:24.093 回答