# Troubles getting custom input plugin with external gem working

**URL:** <https://discuss.elastic.co/t/troubles-getting-custom-input-plugin-with-external-gem-working/56171>\
**Category:** Logstash\
**Created:** [July 22, 2016, 11:30am UTC](https://discuss.elastic.co/t/troubles-getting-custom-input-plugin-with-external-gem-working/56171 "2016-07-22T11:30:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmeerbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cmeerbeek/32/11030_2.png) [@cmeerbeek](https://discuss.elastic.co/u/cmeerbeek)\
**Post date:** [July 22, 2016, 11:30am UTC](https://discuss.elastic.co/t/troubles-getting-custom-input-plugin-with-external-gem-working/56171/1 "2016-07-22T11:30:27Z")

</div>

I am building a custom plug-in with a connection to the Google API. To do this I have included the google-api-client in my gemspec file; s.add\_runtime\_dependency 'google-api-client'.  
When I want to build and test my plug-in I fail at installing the plug-in.  
The following commands work fine;  
jruby -S bundle install  
jruby -S gem build logstash-input-googleanalytics  
The gem file is created and then I want to install the plugin:  
sudo -E ./logstash-plugin install /tmp/logstash-input-googleanalytics/logst  
ash-input-googleanalytics-1.0.0.gem

I recieve the following error:  
Error Bundler::InstallError, retrying 1/10  
An error occurred while installing google-api-client (0.9.11), and Bundler cannot continue.  
Make sure that `gem install google-api-client -v '0.9.11'` succeeds before bundling.

The problem with this error is that manually installing this gem works fine. Only logstash is not able to do is properly.

Anyone an idea here? Thanks!

---

<div class="post-metadata">

**Author:** ![cmeerbeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cmeerbeek/32/11030_2.png) [@cmeerbeek](https://discuss.elastic.co/u/cmeerbeek)\
**Post date:** [August 4, 2016, 12:37pm UTC](https://discuss.elastic.co/t/troubles-getting-custom-input-plugin-with-external-gem-working/56171/2 "2016-08-04T12:37:03Z")

</div>

This issue has been fixed! Building the plugin is now done via jruby 9.x and installing the gem is done via the jruby which is shipped with LogStash.

All better now, case closed 🙂

---

<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:44am UTC](https://discuss.elastic.co/t/troubles-getting-custom-input-plugin-with-external-gem-working/56171/3 "2017-07-06T04:44:53Z")

</div>


