Local filter plugin pretended to be installed but not listed and not working

I tried writing a simple filter plugin, following this Howto: https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_filter_plugin.html

When installing the plugin, it was reported to be installed:

# /opt/logstash/bin/plugin install /usr/local/src/logstash-plugins/logstash-filter-ticketracker/logstash-filter-ticketracker-0.1.0.gem
Validating /usr/local/src/logstash-plugins/logstash-filter-ticketracker/logstash-filter-ticketracker-0.1.0.gem
Installing logstash-filter-ticketracker
Installation successful

But when I list the plugins, it does not show up.

root@d0e2e5106842:/opt/logstash# /opt/logstash/bin/plugin list | grep ticket                                                          

When trying to test it, it shows an error:

 root@d0e2e5106842:/opt/logstash# bin/logstash -e 'input { stdin{} } filter { ticketracker {} } output {stdout { codec => rubydebug }}'
The error reported is: 
  Couldn't find any filter plugin named 'ticketracker'. Are you sure this is correct? Trying to load the ticketracker filter plugin resulted in this error: no such file to load -- logstash/filters/ticketracker


Ubuntu 12.04
Logstash 1.5.0


Issue created under https://github.com/elastic/logstash/issues/3971

@eravelo what do you have in your gemspec?


Here is the content of my gemspec (head is truncated)


s.files = git ls-files.split($)


s.test_files = s.files.grep(%r{^(test|spec|features)/})

Special flag to let us know this is actually a logstash plugin

s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }

Gem dependencies

s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
s.add_development_dependency 'logstash-devutils', '~> 0'