"The source does not contain any versions of 'logstash'" when trying to create a logstash filter plugin

If I follow the current official doc to create a logstash filter plugin, it ends up with the following error:

Fetching https://github.com/elastic/logstash
Fetching gem metadata from https://rubygems.org/.........
Could not find gem 'logstash' in https://github.com/elastic/logstash (at 6.0@400075d).
The source does not contain any versions of 'logstash'

Here is the content of my Gemfile:

source 'https://rubygems.org'

gemspec

gem "logstash", :git => "https://github.com/elastic/logstash", :branch => "6.0"

Your gemfile doesn't look like the example in the documentation.

https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_filter_plugin.html#_add_a_gemfile_3

Thank you for your reply @magnusbaeck but yes, it does actually: the only difference is on the github field replaced by git (also pointed by an SO topic) due to an issue with security. So normally it should be the same...
Moreover I can't use :github field anyway due to the fact that my company is using a proxy and that it doesn't work with git protocol (I must switch to https).

I finally created my logstash filter plugin using the plugin generator tool (logstash-plugin generate --type filter --name sparql --path /tmp/).
Here is the created Gemfile:

source 'https://rubygems.org'
gemspec

Then I had an other issue when I executed bundle install because I'm behind a proxy, and I finally solved it by removing empty <username></username> and <password></password> from the ~/.m2/settings.xml file... very weird but it worked...

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