Hi,
I am a newbie in-terms of Ruby.
I am trying to extend the ruby-filewatch library used by the logstash-input-file plugin.
For the extension I'm using the external lib - rest-client. This external lib requires ruby 2.0 or above to run successfully.
I have made my changes in ruby-filewatch and done
gem build filewatch.gemspec
gem install filewatch-0.9.0.gem
This installs the generated lib filewatch-0.9.0 under my ~/.rvm/gems/ruby-2.4.0/gems folder.
However, whenever I run logstash with - logstash -f [CONF_PATH] it looks for the required libs for it input plugins inside [LOGSTASH_HOME]/vendor/bundle/jruby/1.9/gems
So I copied the generated filewatch-0.9.0 folder into the above path.
But still I get the following error:
LoadError: no such file to load -- rest-client
require at org/jruby/RubyKernel.java:1040
require at [PATH]/logstash-5.3.0/vendor/bundle/jruby/1.9/gems/polyglot-0.3.5/lib/polyglot.rb:65
(root) at [PATH]/logstash-5.3.0/vendor/bundle/jruby/1.9/gems/filewatch-0.9.0/lib/filewatch/observing_tail.rb:2
observing_tail.rb:2 has this code :
require 'rest-client'
Can someone help me get through this issue??