Questions tagged [rjb]

Rjb is a bridge between Ruby and Java using JNI (Java Native Interface).

Rjb is a bridge between Ruby and Java using JNI (Java Native Interface). https://rubyforge.org/projects/rjb/

44 questions
7
votes
1 answer

Rails: Segmentation fault at Rjb when in background process, works fine when not in background?

I am running a Resque background task and keep getting segmentation fault, when calling a gem, that uses Rjb. Everything works fine though, when run not in the background. Here is a line in gem, that causes the error: def self.rjb_initialize …
5
votes
6 answers

Can't deploy to Heroku the app with RJB gem

I've set the JAVA_HOME variable heroku config:add JAVA_HOME=/usr/lib/jvm/java-6-openjdk checked that heroku config shows this variable with value, then pushed: git push heroku master and still get JAVA_HOME is not set error while bundler is…
Paul
  • 25,812
  • 38
  • 124
  • 247
5
votes
2 answers

JAVA_HOME not setting for RJB

I am installing RJB by ruby gem on UBUNTU 11.* I added the export JAVA_HOME=/usr/lib/jvm/java-6-... export PATH=$PATH:$JAVA_HOME/bin to the .bashrc file at home directory. But still it throws the err or JAVA_HOME not set. Does anyone know what…
Sen Han
  • 71
  • 1
  • 5
4
votes
1 answer

Error “can't create Java VM” trying to use Ruby Java Bridge (RJB) gem

I'm trying to implement the Ruby Java Bridge (RJB) gem to talk to JVM so that I can run the Open-NLP gem. I have Java installed and running on Windows 8. All indications, at least those I know of, are that Java is installed and operational. But,…
Richard_G
  • 4,700
  • 3
  • 42
  • 78
4
votes
1 answer

Deploying with Capistrano, JAVA_HOME is not being read

I am deploying with Capistrano and everything looked good until I got to Rjb part.. I can do $ echo $JAVA_HOME /usr/lib/jvm/java-1.6.0-openjdk-amd64 More than that, I can do gem install rjb on server and it is getting installed... However when I…
Stpn
  • 6,202
  • 7
  • 47
  • 94
3
votes
1 answer

Setting JAVA_HOME evironment variable in/for Ruby and RJB in windows

Though there seem to be a bunch of questions and answers related to setting the JAVA_HOME variable in Windows, I am not entirely sure where I am going wrong. I've followed all sorts of different instructions on setting the environment variable, and…
pedalpete
  • 21,076
  • 45
  • 128
  • 239
3
votes
1 answer

Ruby 2.5.1, Ruby Java Bridge (RJB), and Ubuntu 18.04: Getting `Constants DL and Fiddle is not defined.`

I need help. I can't figure out why I can't boot my Rails 5.2 app now that rjb is a dependency. I keep getting a generic error about Constants DL and Fiddle is not defined. First, yes I have read the Documentation. Second, yes I have set…
danielricecodes
  • 3,446
  • 21
  • 23
3
votes
1 answer

RJB Hello World Example

I am trying to call a function from a java class in my Ruby on Rails project using RJB (Ruby Java Bridge). The Java class is public class HelloWorld { int fifty(){ return 50 ; } public static void main(String[] args) { //…
MN94
  • 93
  • 6
3
votes
2 answers

java.lang.NullPointerException in OpenNLP using RJB (Ruby Java Bridge)

I am trying to use the open-nlp Ruby gem to access the Java OpenNLP processor through RJB (Ruby Java Bridge). I am not a Java programmer, so I don't know how to solve this. Any recommendations regarding resolving it, debugging it, collecting more…
Richard_G
  • 4,700
  • 3
  • 42
  • 78
2
votes
1 answer

Using RJB to call scala code from Ruby

I'm about to start rewriting bits and pieces of our Rails app that do the relatively heavier number crunching in Scala for speed. The plan eventually is to have all the processing done by a scala daemon running in the background and just use Rails…
Russell
  • 12,261
  • 4
  • 52
  • 75
2
votes
1 answer

How to access nested static classes using Rjb?

Lets say a Java program defines the class A, which has a nested static class 'B'. How is it possible to access class B using the Ruby-Java Bridge? For example, these attempts do not work: A = Rjb::import('package.A') A.B A::B Is there a way to…
user2398029
  • 6,699
  • 8
  • 48
  • 80
2
votes
1 answer

Ruby RJB can't create Java VM error

I've seen this question asked a few times but no repsonses have worked for me. I've tried several versions of rjb, several jre versions..No matter what I try, when trying to use the rjb gem i get the following error: DL is deprecated, please use…
Alex Legault
  • 61
  • 2
  • 13
2
votes
1 answer

Can't create Java VM rjb ubuntu

I am using rjb to connect java classes in my rails application... But I am getting this error can't create Java VM My ruby -v gave me ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux] and java --version java version "1.7.0_79" OpenJDK…
user2493476
2
votes
0 answers

ruby—call Java prgramm that reads from Stdin

I would like to run a java program from within a ruby script, using rjb. All in all, I would like to write a String to the Stdin as input for the program and read its output from stdout. I have tried something like that, but the script just…
philipp
  • 15,947
  • 15
  • 61
  • 106
2
votes
1 answer

Ruby 32 bit with java 64 bit on Windows

I am using java bridge (for Stanford-Core-NLP) with ruby, and its seems that jrb can not work while Ruby is 32 bit (193) and Java is 64 bit, on a Windows machine. Could it be? is there any solution, better than installing Ruby 64 (not supported by…
user2986978
  • 153
  • 1
  • 5
1
2 3