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
10
votes
1 answer

Rails app connection pool size, avoiding max pool size issues

I am running a JRuby on Rails application. I see a lot of this randomly in my logs: The max pool size is currently 5; consider increasing it I understand I can increase the max pool size in my configuration to address this. The problem I'm looking…
randombits
  • 47,058
  • 76
  • 251
  • 433
9
votes
3 answers

How can I sanitize all params coming into a Sinatra app?

In a similar Rails app, I was able to make a recursive Hash-checking function which then runs the Sanitize gem's clean/fragment method to remove any HTML elements from incoming params hash. I used a before filter in the application_controller so…
rcd
  • 1,348
  • 1
  • 14
  • 27
9
votes
1 answer

How to stop RVM interfering with JRuby

I have used Warbler to create a Jar file from my Ruby source. I also have RVM installed. The behaviour of the jar differs depending on which Ruby version RVM is using: if I rvm use jruby then the jar works normally, but if I rvm use 2.2 then running…
fblundun
  • 987
  • 7
  • 19
9
votes
2 answers

Debugging in JRuby 9000

What is the best way to debug in JRuby 9000? Pry and Byebug are both MRI-dependent. All the JRuby info that I have found seem to be only for pre-9k, and are not working for my JRuby 9k setup.
RezaF
  • 123
  • 1
  • 6
9
votes
2 answers

Jruby Gems-in-a-jar issue

I am trying to write some code in ruby (using jruby) to be compiled to java bytecode with jrubyc and deployed to a remote machine where it will be run on the JVM (no ruby available there). Everything works fine as long as I am happy to stick with…
antonio
  • 91
  • 1
  • 2
9
votes
2 answers

Rails query slow but fast in pgAdmin

I'm trying to figure out why one of the queries in my rails app is under performing quite considerably. I'm using Postgres 9.3, and rails 4.0.3 with jRuby 1.7.10 so potentially it's an issue with the JDBC driver? But basically, it's a VERY simple…
PaReeOhNos
  • 4,338
  • 3
  • 30
  • 41
9
votes
4 answers

Error Deploying Java WAR File: SEVERE: Exception fixing docBase for context

I have already resolved this one but it may help someone out there who stumbles across this problem. Stackoverflow has saved me countless hours on seemingly obscure and mysterious IT issues in the past. Here is the error I was getting when…
Simon K
  • 111
  • 1
  • 1
  • 5
9
votes
1 answer

In JRuby, how do I determine what causes java.lang.ThreadDeath?

While running unit tests for some code that interacts with temporary files in JRuby, I sometimes get the following: Exception: java.lang.ThreadDeath thrown from the UncaughtExceptionHandler in thread "Thread-6395" It doesn't seem to cause any…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
9
votes
1 answer

Using JRuby class supplied in a gem from Clojure

I am a fairly simple need to use a Ruby class from within Clojure. The complicating factors are that the class is supplied in a gem. The optimal approach would be to setup my Leiningein project file along the lines of: (project foo "" ... …
fogus
  • 6,126
  • 5
  • 36
  • 42
8
votes
2 answers

Non-web application with JRuby Warbler

How can I compile a JRuby app using Warbler that isn't on the web at all? This is always what happens when I try: $ warble warble aborted! No executable script found Tasks: TOP => jar:files (See full trace by running task with --trace) I must be…
Jwosty
  • 3,497
  • 2
  • 22
  • 50
8
votes
1 answer

output_safety.rb:34 warning: regexp match /.../n against to UTF-8 string

When starting up my WEBrick server, I get next warning when calling the home page: c:/Program Files/jruby-1.6.7/lib/ruby/gems/1.8/gems/activesupport- 3.2.2.rc1/lib/active_support/core_ext/string/output_safety.rb:34 warning: regexp match /.../n…
Lieven Cardoen
  • 25,140
  • 52
  • 153
  • 244
8
votes
1 answer

Validating Jenkins plugin forms with Ruby

I'm developing a Jenkins plugin in Ruby. You're supposed to be able to configure every node that connects to the server so that an email is sent to a specified address when the node loses its connection to the master. EmailNodeProperty adds a field…
JonatanEkstedt
  • 905
  • 1
  • 8
  • 27
8
votes
4 answers

Anyone Tried Mixing JavaFX and JRuby?

Has anyone tried mixing JavaFX and JRuby? I've built a JRuby desktop application with a Swing GUI (100% JRuby) and I'm toying with the idea of replacing the GUI with JavaFX for a more slick feel. To fit with my current application, I want to…
Samuel Holloway
  • 230
  • 2
  • 9
8
votes
3 answers

What is the significance for Ruby programmers of SAP's new implementation of Ruby?

SAP announced Blue Ruby, a version of Ruby that runs inside the ABAP Virtual Machine. This seems to lend additional credibility to the Ruby language but, except for SAP developers, does this have any applicability to the rest of the Ruby community?…
Paul Dexter
  • 405
  • 1
  • 4
  • 10
8
votes
1 answer

JRuby cannot switch to 1.6.2 for this interpreter error rvm

I am trying to configure JRuby using RVM on Ubuntu Linux. I have successfully installed RVM, but when trying to install Jruby, I get the following error: dlitwak@ubuntu:~$ rvm install jruby-1.6.0 jruby-1.6.0 - #fetching jruby-1.6.0 - #extracted to…
dlitwak
  • 1,559
  • 2
  • 12
  • 14