我是Logstash和Ruby的初学者。
C:\Windows\system32>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.6.8
- RUBY VERSION: 2.3.1 (2017-01-11 patchlevel 0) [java]
- INSTALLATION DIRECTORY: C:/jruby-9.1.7.0/lib/ruby/gems/shared/gems
- USER INSTALLATION DIRECTORY: C:/Users/A.aminian/.gem/jruby/2.3.0
- RUBY EXECUTABLE: C:/jruby-9.1.7.0/bin/jruby.exe
- EXECUTABLE DIRECTORY: C:/jruby-9.1.7.0/lib/ruby/gems/shared/gems/bin
- SPEC CACHE DIRECTORY: C:/Users/A.aminian/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: C:/jruby-9.1.7.0/etc
- RUBYGEMS PLATFORMS:
- ruby
- universal-java-1.8
- GEM PATHS:
- C:/jruby-9.1.7.0/lib/ruby/gems/shared/gems
- C:/jruby-9.1.7.0/lib/ruby/gems/shared
- REMOTE SOURCES:
- https://rubygems.org/
并且“C:\ logstash-5.4.0”目录中的“bundle install”命令将安装所有依赖项。我为http和https协议设置了一些代理:
设置https_proxy = https:// ... http_proxy代理在.m2 / setting.xml(maven设置)中定义。
我按照sorl_http
中提到的所有步骤操作当我运行以下命令时,会启动这些错误:
C:/logstash-5.4.0/vendor/bundle/jruby/2.3.0/gems/rubyzip-1.1.7/lib/zip.rb:35: warning: ObjectSpace impacts performance.
Installing...
ERROR: Installation Aborted, message: undefined method `each_pair' for "C:/logstash-5.4.0/vendor/bundle/jruby/2.3.0":String
Did you mean? each_char
答案 0 :(得分:0)
此错误的主要原因与各种版本的logstash和jruby的兼容性有关。在JRUBY的最后一个发行说明(jruby-9.1.10.0)中,它提到了" Ruby 2.x兼容性"。使用以前版本的jruby,logstash-plugin很难诊断相关gem文件的正确路径。