# Cannot build custom plugin due to logstash-core-plugin-api version issue

**URL:** <https://discuss.elastic.co/t/cannot-build-custom-plugin-due-to-logstash-core-plugin-api-version-issue/52991>\
**Category:** Logstash\
**Created:** [June 16, 2016, 12:23pm UTC](https://discuss.elastic.co/t/cannot-build-custom-plugin-due-to-logstash-core-plugin-api-version-issue/52991 "2016-06-16T12:23:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrstphrhrt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chrstphrhrt/32/10356_2.png) [@chrstphrhrt](https://discuss.elastic.co/u/chrstphrhrt)\
**Post date:** [June 16, 2016, 12:23pm UTC](https://discuss.elastic.co/t/cannot-build-custom-plugin-due-to-logstash-core-plugin-api-version-issue/52991/1 "2016-06-16T12:23:34Z")

</div>

Hi, I've created a custom plugin derived from `logstash-input-redis` that adds support for additional processing of output that redis emits but which is not parsed by the upstream plugin.

I have successfully built the gem and installed all dependencies, but when I run `logstash-plugin install mygem.gem` I get the following error:

```
ERROR: Installation Aborted, message: Bundler could not find compatible versions for gem "logstash-core-plugin-api":
  In snapshot (Gemfile.lock):
    logstash-core-plugin-api (= 1.10.0)

```

I have manually downloaded and installed that package version with jgem and I see that it is installed:

```
$ jgem list | grep logstash-core-plugin-api
logstash-core-plugin-api (2.1.8 java, 1.1.0 java)

```

The upstream plugin from elastic depends on ~\> 2.0 of this gem, and there are no references to 1.1 anywhere in the code, so this dependency must be coming from somewhere deep down 🙂

If I remove the copy of version 2.1.8 and re-run the install, the same error results. Even when using `--local` option and providing full path to the gem. This suggests to me there might be some issue with the jruby environment but I don't know how to debug it.

Output for `jbundle update` shows a missing classpath.rb, which does not exist. Not sure if that's relevant.

```
$ jbundle update
Jar dependencies are up to date !
/usr/local/lib/ruby/gems/2.3.0/gems/jbundler-0.9.3/lib/jbundler/classpath_file.rb:34:in `load': cannot load such file -- /Users/hart/Documents/logstash-input-redis/.jbundler/classpath.rb (LoadError)
	from /usr/local/lib/ruby/gems/2.3.0/gems/jbundler-0.9.3/lib/jbundler/classpath_file.rb:34:in `load_classpath'

```

Any ideas? Thanks!

---

<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:** [July 6, 2017, 4:52am UTC](https://discuss.elastic.co/t/cannot-build-custom-plugin-due-to-logstash-core-plugin-api-version-issue/52991/2 "2017-07-06T04:52:29Z")

</div>


