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
24
votes
2 answers

How to mass delete multiple rows in hbase?

I have the following rows with these keys in hbase table "mytable" user_1 user_2 user_3 ... user_9999999 I want to use the Hbase shell to delete rows from: user_500 to user_900 I know there is no way to delete, but is there a way I could use the…
Rolando
  • 58,640
  • 98
  • 266
  • 407
23
votes
5 answers

Is there an advantage to running JRuby if you don't know any Java?

I've heard great things about JRuby and I know you can run it without knowing any Java. My development skills are strong, Java is just not one of the tools I know. It's a massive tool with a myriad of accompanying tools such as Maven/Ant/JUnit…
randombits
  • 47,058
  • 76
  • 251
  • 433
23
votes
4 answers

Create deployable JRuby JAR file?

I need to compile my JRuby application into a standalone JAR file. How can I do this?
PythonGem
  • 491
  • 1
  • 5
  • 9
22
votes
2 answers

How do I cleanly shut down an embedded JRuby in response to a SIGTERM to the JVM process?

I am running a Middleman (which uses Webrick) server on JRuby inside a JVM process using the org.jruby.embed.ScriptingContainer API. If I shutdown cleanly and stop the server from inside the JVM, everything works as expected. But if I send a SIGTERM…
levand
  • 8,440
  • 3
  • 41
  • 54
22
votes
3 answers

OpenSSL::Cipher::CipherError with Rails4 on JRuby

Rails4 uses an encrypted cookie session store by default. When the app tries to encrypt a cookie the following error is raised: OpenSSL::Cipher::CipherError: Illegal key size: possibly you need to install Java Cryptography Extension (JCE) Unlimited…
Alex Lang
  • 1,298
  • 11
  • 14
22
votes
1 answer

Undefined method `bytesize' for #

I'd like to store and update blogger labels to datastore in GAE. When I run that code, I get this error: javax.servlet.ServletContext log: Application…
tknv
  • 562
  • 1
  • 6
  • 23
21
votes
3 answers

JRuby Performance

I have a Rails 3.2.2 application that I am looking to run using JRuby 1.6.7 (1.9.2 mode). I have a sample app running in MRI ruby 1.9.3 and a typical request is returning in ~40ms: Completed 200 OK in 36ms (Views: 27.5ms | ActiveRecord:…
Larry Gebhardt
  • 232
  • 2
  • 7
20
votes
2 answers

Why is a Regexp object considered to be "falsy" in Ruby?

Ruby has a universal idea of "truthiness" and "falsiness". Ruby does have two specific classes for Boolean objects, TrueClass and FalseClass, with singleton instances denoted by the special variables true and false, respectively. However, truthiness…
Jörg W Mittag
  • 363,080
  • 75
  • 446
  • 653
20
votes
5 answers

What's the difference between Duby and Juby and why would I need either of them?

According to Charles Nutter, Duby is a static-typed language with Ruby's syntax and Java's type system. Duby supports all Ruby's literals, uses local type inference (only argument types must be declared), and runs as fast as Java (because…
19
votes
2 answers

Is it possible to debug unit tests in Ruby on Rails?

So, I just moved to new project that is built on Ruby on Rails. I'm new to it and I'm still learning it. I can debug most of the application code, but it seems I can not debug unit test code and code that is tested. When I run unit testing in debug…
Pavel Feldman
  • 4,621
  • 7
  • 30
  • 31
18
votes
2 answers

How to enable C extension support in jRuby?

I want to install a gem but I get the following error: Building native extensions. This could take a while... ERROR: Error installing twitter-login: ERROR: Failed to build gem native extension. C:/nwcloud/jruby-1.7.2/bin/jruby.exe…
ada91
  • 828
  • 2
  • 7
  • 19
17
votes
1 answer

JRuby on Rails: Adding a folder to the classpath

I'm trying to add an entire folder to the JRuby 1.5 classpath for my Rails app. The JRuby Wiki suggests the following: "... add the config directory to the JRuby classpath in config/environment.rb:" $CLASSPATH <<…
organicveggie
  • 559
  • 5
  • 22
17
votes
3 answers

Shutdown hook for Rails

I'd like to have some cleanup code run when Rails is shutting down - is that possible? My situation is that I have a few threads in the background (I'm using jruby and calling into java) that live for the life of the process and I need to let them…
Stuart
  • 323
  • 2
  • 6
16
votes
1 answer

Faster RSpec with JRuby

I'm pretty new to the whole JRuby world. I'm using RSpec on a pretty big test suite. I'd like to be able to run the specs frequently but the JVM takes so long to startup it's becoming a real time drain. Is there a way to keep the JVM running? or a…
jpoz
  • 2,257
  • 1
  • 23
  • 29
16
votes
9 answers

java.lang.OutOfMemoryError: Java heap space

while using Jruby, i get this message. Complete Java stackTrace java.lang.OutOfMemoryError: Java heap space how to resolve ?
asdfasdf