title: logstash example plugin not working
body: <p>I'm just starting with Logstash. I've been able to run it using built-in plugins such as <code>ruby-debug</code> and <code>csv</code>. I'm trying now to create a custom plugin and had issues following the tutorial <a href="https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_output_plugin.html" rel="nofollow">here</a></p>
  
  <p>I got up to the step of installing the plugin. My plugin was located at $LS_HOME/plugins/logstash-output-example/ so, from $LS_HOME, I ran</p>
  
  <pre><code>bin/plugin install plugins/logstash-output-example/logstash-output-example-0.1.3.gem
  </code></pre>
  
  <p>which gave me this output</p>
  
  <pre><code>Validating plugins/logstash-output-example/logstash-output-example-0.1.3.gem
  Installing logstash-output-example
  Installation successful
  </code></pre>
  
  <p>I was pretty satisfied. To test I ran </p>
  
  <pre><code>bin/logstash -e 'input { stdin {} } output { example{} }';
  </code></pre>
  
  <p>which gave me</p>
  
  <pre><code>The error reported is: 
  Couldn't find any output plugin named 'example'. Are you sure this is correct? 
  Trying to load the example output plugin resulted in this error: no such file to load -- logstash/outputs/example
  </code></pre>
  
  <p>Then I was sad. What did I do wrong? </p>
  
  <p>For reference, here's the plugin code</p>
  
  <pre><code># encoding: utf-8
  require "logstash/outputs/base"
  require "logstash/namespace"
  
  # An example output that does nothing.
  class LogStash::Outputs::Example &lt; LogStash::Outputs::Base
    config_name "example"
  
    public
    def register
    end # def register
  
    public
    def receive(event)
      return "Event received"
    end # def event
  end # class LogStash::Outputs::Example
  </code></pre>