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

**URL:** https://discuss.elastic.co/t/the-source-does-not-contain-any-versions-of-logstash-when-trying-to-create-a-logstash-filter-plugin/110399
**Category:** Logstash
**Created:** [December 5, 2017, 5:18pm UTC](https://discuss.elastic.co/t/the-source-does-not-contain-any-versions-of-logstash-when-trying-to-create-a-logstash-filter-plugin/110399 "2017-12-05T17:18:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![anthony-o](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@anthony-o](https://discuss.elastic.co/u/anthony-o)
#### Post date: [December 5, 2017, 5:18pm UTC](https://discuss.elastic.co/t/the-source-does-not-contain-any-versions-of-logstash-when-trying-to-create-a-logstash-filter-plugin/110399/1 "2017-12-05T17:18:49Z")

</div>

If I follow the current [official doc to create a logstash filter plugin](https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_filter_plugin.html), 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"
```

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [December 8, 2017, 6:19am UTC](https://discuss.elastic.co/t/the-source-does-not-contain-any-versions-of-logstash-when-trying-to-create-a-logstash-filter-plugin/110399/2 "2017-12-08T06:19:42Z")

</div>

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](https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_filter_plugin.html#_add_a_gemfile_3)

---

<div class="post-metadata">

### Author: ![anthony-o](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@anthony-o](https://discuss.elastic.co/u/anthony-o)
#### Post date: [December 8, 2017, 9:37am UTC](https://discuss.elastic.co/t/the-source-does-not-contain-any-versions-of-logstash-when-trying-to-create-a-logstash-filter-plugin/110399/3 "2017-12-08T09:37:57Z")

</div>

Thank you for your reply @magnusbaeck but yes, it does actually: the only difference is on the `github` field [replaced by `git`](http://bundler.io/man/gemfile.5.html#GITHUB) (also pointed by [an SO topic](https://stackoverflow.com/a/43536153/535203)) due to [an issue](https://github.com/bundler/bundler/issues/5476) 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`).

---

<div class="post-metadata">

### Author: ![anthony-o](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@anthony-o](https://discuss.elastic.co/u/anthony-o)
#### Post date: [December 14, 2017, 4:31pm UTC](https://discuss.elastic.co/t/the-source-does-not-contain-any-versions-of-logstash-when-trying-to-create-a-logstash-filter-plugin/110399/4 "2017-12-14T16:31:48Z")

</div>

I finally created my logstash filter plugin using the [plugin generator tool](https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_filter_plugin.html#_use_the_plugin_generator_tool_3) (`logstash-plugin generate --type filter --name sparql --path /tmp/`).  
Here is the [created `Gemfile`](https://github.com/anthony-o/docker-elk_logstash-filter-sparql/blob/426e4280fbc4515a8db5b29e9c67bf2ffa2b1bab/logstash/logstash-filter-sparql/Gemfile):

```ruby
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>`](https://github.com/anthony-o/docker-elk_logstash-filter-sparql/blob/426e4280fbc4515a8db5b29e9c67bf2ffa2b1bab/logstash/Dockerfile#L19) from the `~/.m2/settings.xml` file... very weird but it worked...

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 11, 2018, 4:32pm UTC](https://discuss.elastic.co/t/the-source-does-not-contain-any-versions-of-logstash-when-trying-to-create-a-logstash-filter-plugin/110399/5 "2018-01-11T16:32:05Z")

</div>

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