Jruby openssl循环依赖

时间:2011-06-06 16:46:29

标签: jruby

我重新安装了jruby 1.6.2,然后想安装一些宝石。

我跑了这个命令:

jruby -S gem install cucumber

收到此错误消息:

JRuby limited openssl loaded. http://jruby.org/openssl
gem install jruby-openssl for full support.
LoadError: OpenSSL::SSL requires the jruby-openssl gem
                         (root) at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:8
                       use_ssl= at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/shared/jruby/openssl/autoloads/ssl.rb:124
                 connection_for at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:267
                        request at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:349
               open_uri_or_path at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:306
                     fetch_path at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:181
                     load_specs at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:251
                     load_specs at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/maven_gemify.rb:72
                           list at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:224
                           each at org/jruby/RubyArray.java:1602
                           list at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:220
                           list at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/maven_gemify.rb:63
      find_matching_with_errors at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:143
      find_matching_with_errors at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/maven_gemify.rb:54
              fetch_with_errors at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/spec_fetcher.rb:83
         find_gems_with_sources at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:108
  find_spec_by_name_and_version at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:212
                        install at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb:244
                        execute at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:120
                           each at org/jruby/RubyArray.java:1602
                        execute at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb:115
                         invoke at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/command.rb:278
                   process_args at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:133
                            run at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb:103
                            run at /Users/Staffr02/Development/jruby-1.6.2/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:63
                         (root) at /Users/Staffr02/Development/jruby-1.6.2/bin/gem:21

然后我尝试了这个:

jruby -S gem install jruby-openssl

我得到了同样的错误,这似乎有点奇怪。我正在运行Mac OS 10.6.6。

我做了一些谷歌搜索,并没有真正找到任何东西,除了一个说这个的页面:

然而,这打破了使用require'openssl'作为openssl是否可用的测试的程序。 Soap4r就是这样一个程序。要支持此行为,只需添加

即可

要求'jruby / openssl / gem_only'

所以我跟踪了似乎有错误的文件(gem_runner.rb)并在那里添加了require行。我再次运行jruby -S gem install jruby-openssl,并收到此错误:

ERROR:  While executing gem ... (NameError)
    uninitialized constant Net::HTTP::OpenSSL

以前有其他人有这个问题吗?我不明白我做错了什么!是否有一些我应该首先删除的独立openssl设置?

非常感谢任何指导 - 谢谢,

丽贝卡

0 个答案:

没有答案