[JRuby] Additional ruby module

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 !

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