Questions tagged [jruby]

JRuby is an open-source Java implementation of the Ruby programming language. It is Ruby for the JVM. Using idiomatic Ruby syntax, JRuby can consume Java classes and libraries with ease.

JRuby is an open-source Java implementation of the Ruby programming language. It is Ruby for the JVM. Using idiomatic Ruby syntax, JRuby can consume Java classes and libraries with ease.

The tight integration of JRuby with the JVM affords JRuby many advantages which include concurrency, native threads, a mature and efficient garbage collector and significant performance boosts via JIT compilation.

2833 questions
1
vote
1 answer

How to call jar function from Jruby?

I've tried a few methods and this is the closest yet - how can the maths library be called from a jruby script? require 'java' require 'commons-math3-3.2.jar' import org.apache.commons.math3.random.RandomGenerator myClass =…
RedNax
  • 1,507
  • 1
  • 10
  • 20
1
vote
1 answer

Using redis in jruby threaded setup

So the redis gem is supposed to be thread-safe, that's good. But I am wondering how I need to set it up. I am using jRuby and Celluloid (using default fibers). The way I'm using it now is I have a global method defined: def redis @_redis ||=…
mrbrdo
  • 7,968
  • 4
  • 32
  • 36
1
vote
2 answers

How do I modify a global variable in my Rails script from JavaScript?

I have the following variable defined in my Rails controller: $PATH In JavaScript I would like to change the value of this variable: