Could not find gem 'logstash-devutils (>= 0) ruby' in any of the gem sources

前端 未结 2 486
小蘑菇
小蘑菇 2021-01-12 05:01

I\'m just trying to learn to write the example-output-plugin,follow this page:

http://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_output_plugin

2条回答
  •  攒了一身酷
    2021-01-12 05:17

    I tried installing the gem manually and got a different error:

    There was a RuntimeError while loading logstash-devutils.gemspec: Only JRuby is supported from /Users/bnewton/.rvm/gems/ruby-2.2.1/bundler/gems/logstash-devutils-15c59bfaab59/logstash-devutils.gemspec:2:in `'

    This leads me to believe the logstash-devutils requires jruby rather than the usual ruby. I use rvm, so it was a matter of installing and using jruby instead of regular ruby. So if you are using rvm, run:

    rvm install jruby-1.7.19
    rvm use jruby-1.7.19
    gem install bundler
    bundle install
    

    This fixed it for me, and I was able to run bundle install without error.

提交回复
热议问题