Input plugin development : How to run ruby file standalone before generating gem

Hi All

i am developing a input plugin, i am following the below steps

  1. Generated the full file tree structure from online input plugin generation as mentioned here
  2. Installed rbenv
  3. Installed jruby
  4. gem install bundler
  5. cd to the location of the plugin folder
  6. installed " bundle install", this installs successfully (2 Gemfile dependencies, 57 gems)
  7. Under file flow.rb

│ └── logstash
│ └── inputs
│ └── flow.rb

In the flow.rb, i declared the two requires like

require "logstash/inputs/base"
require "logstash/namespace"

When i run the ruby file individually flow.rb, i get error like cannot load file base.rb
Since i have already installed all the logstash core ruby gems, it is not picking up the logstash-core ruby files

While building the gems, i set my dependency in gem file as

source ''

My problem is i do not want to create a final logstash gem and load into logstash as plugin.
Before doing so i want to make sure my flow.rb file is correct. For that i am running flow.rb manually to test my code.

But i am getting errors because of requirement statements. How to make sure that i call all the dependencies and gems to my development environment in one go and use my flow.rb to do the overall development.

Basically i do not need errors by require statements which is declared on top


Do anyone has idea on my above question? Its just lack of documentation.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.