# \[JRuby\] Additional ruby module

**URL:** <https://discuss.elastic.co/t/jruby-additional-ruby-module/161222>\
**Category:** Logstash\
**Created:** [December 17, 2018, 11:16pm UTC](https://discuss.elastic.co/t/jruby-additional-ruby-module/161222 "2018-12-17T23:16:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![drosys](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@drosys](https://discuss.elastic.co/u/drosys)\
**Post date:** [December 17, 2018, 11:16pm UTC](https://discuss.elastic.co/t/jruby-additional-ruby-module/161222/1 "2018-12-17T23:16:45Z")

</div>

Dear All,  
I d like to calculate hiversine distance (nbr of kilometer between 2 geo points)  
To implement this I need to use "Math" module.  
I have tried to check the availability with:

> $ /usr/share/logstash/bin/logstash -i irb  
> WARNING: Could not find logstash.yml which is typically located in $LS\_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults  
> Could not find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console  
> irb(main):001:0\> require "Math"  
> LoadError: no such file to load -- Math  
> from org/jruby/RubyKernel.java:955:in `require'

But I have found this:

> $ locate jruby | grep -i math  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/frozen\_old\_spec/tags/1.8.6/core/math  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/frozen\_old\_spec/tags/1.8.6/core/math/log2\_spec.rb  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/frozen\_old\_spec/tags/1.8.6/core/math/log\_spec.rb  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/frozen\_old\_spec/tags/1.8.7/core/math  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/frozen\_old\_spec/tags/1.8.7/core/math/log2\_spec.rb  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/frozen\_old\_spec/tags/1.8.7/core/math/log\_spec.rb  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/lib/backports/1.9.1/math  
> /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/backports-3.11.3/lib/backports/1.9.1/math.rb

I have several questions:

1. Is this module available and how to use it ?
2. I have the same problem as i also need to use sqlite3
3. How to perform additional ruby modules ?

Thanks in advance for your answer !

---

<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 14, 2019, 11:16pm UTC](https://discuss.elastic.co/t/jruby-additional-ruby-module/161222/2 "2019-01-14T23:16:45Z")

</div>

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