# How to install an optional gem for a bundled plugin

**URL:** <https://discuss.elastic.co/t/how-to-install-an-optional-gem-for-a-bundled-plugin/117803>\
**Category:** Logstash\
**Created:** [January 31, 2018, 12:41pm UTC](https://discuss.elastic.co/t/how-to-install-an-optional-gem-for-a-bundled-plugin/117803 "2018-01-31T12:41:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dheeraj\_Gupta](https://avatars.discourse-cdn.com/v4/letter/d/49beb7/32.png) [@Dheeraj\_Gupta](https://discuss.elastic.co/u/Dheeraj_Gupta)\
**Post date:** [January 31, 2018, 12:41pm UTC](https://discuss.elastic.co/t/how-to-install-an-optional-gem-for-a-bundled-plugin/117803/1 "2018-01-31T12:41:46Z")

</div>

Hi,

I am trying to get logstash-output-webhdfs to work with kerberos. The documentation states that I need to install the `gssapi` gem for using the kerberos feature (The plugin works fine without gssapi for authentication-less scenarios).

Is there an official way to install gems which are not bundled with logstash? I looked at the `plugin-install` script but it requires an internet connection (or a staging server with an internet connection) and hence I cannot use that.

What I have done until now is use this ugly hack:

```
env GEM_HOME=/usr/share/logstash/vendor/bundle/jruby/2.3.0 /usr/share/logstash/vendor/jruby/bin/jruby /usr/share/logstash/vendor/jruby/bin/gem install --ignore-dependencies -V /home/admin/gssapi-1.2.0.gem

```

which gets the job done but which I don;t like as it is ugly and not easy to automate when using a configuration manager like salt/chef (jruby version may change etc.). Also to my mind once I update logstash, I will have to re-install the gem.

Is there a better way to install a gem so that it can be used within logstash?

---

<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:** [February 28, 2018, 12:41pm UTC](https://discuss.elastic.co/t/how-to-install-an-optional-gem-for-a-bundled-plugin/117803/2 "2018-02-28T12:41:57Z")

</div>

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