# Path for custom ruby gems?

**URL:** <https://discuss.elastic.co/t/path-for-custom-ruby-gems/94907>\
**Category:** Logstash\
**Created:** [July 28, 2017, 6:32am UTC](https://discuss.elastic.co/t/path-for-custom-ruby-gems/94907 "2017-07-28T06:32:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![german23](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/german23/32/11052_2.png) [@german23](https://discuss.elastic.co/u/german23)\
**Post date:** [July 28, 2017, 6:32am UTC](https://discuss.elastic.co/t/path-for-custom-ruby-gems/94907/1 "2017-07-28T06:32:42Z")

</div>

Hey folks,

currently i am trying to implement a caching solution via memcache to cache our netbios name lookups.

```
/usr/share/logstash/bin/logstash --version
logstash 5.5.0

```

For this task i installed a ruby plugin called memcached.

```
gem list --local |grep memca
memcached (1.8.0)

```

As i am trying to initialize it on logstash startup

```
ruby {
       init => "
        require 'memcached'
        $cache = Memcached.new('localhost:11211')
        "
       code => "
       ip = event.get('src')
       var = 'value.#{ip}'
       value = $cache.get 'var'
       "
  }

```

I get the error "LoadError: no such file to load -- memcached".

In which file i can tell logstash that the module is located in "/var/lib/gems/2.1.0/gems/memcached-1.8.0/" ?

On a side node - anyone maybe knows a working memcache filter or any other RAM buffering solution for logstash? There is one [https://github.com/coolacid/logstash-filter-cache-memcached](https://github.com/coolacid/logstash-filter-cache-memcached) but it seems heavily outdated and not working with newer Logstash versions.

Any input is appreciated.

Regards

---

<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:** [August 25, 2017, 6:33am UTC](https://discuss.elastic.co/t/path-for-custom-ruby-gems/94907/2 "2017-08-25T06:33:10Z")

</div>

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