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
16
votes
4 answers

How to profile JRuby code?

I'd like to profile my JRuby app. For MRI I always use ruby-prof, but I don't think this works on JRuby. I don't want to use a Java-profiler, because it won't give me the ruby line numbers. Is there a jruby-prof?
Michiel de Mare
  • 41,982
  • 29
  • 103
  • 134
15
votes
2 answers

Use JRuby for Ruby web applications? Is it worth it?

Background: I'm writing a 'standard' (nothing special) web application in Ruby (not Rails) and I need to start thinking about deployment. So I've been hearing a lot of recommendations to use JRuby to deploy Ruby web applications, regardless of…
Sasha Chedygov
  • 127,549
  • 26
  • 102
  • 115
15
votes
2 answers

Convert JRuby string to Java byte array, and back again

I'm trying to pass a binary string in JRuby as a byte[] through some Java library and into JRuby again, where I want to convert it back into a string, but I can't figure out how to do it without the string getting messed up. Specifically I'm…
Theo
  • 131,503
  • 21
  • 160
  • 205
15
votes
1 answer

jruby -S bundle install jruby: No such file or directory -- bundle (LoadError)

I have my ruby on rails application and I have installed jruby-1.7.4 in my Windows XP. When I try to run jruby -S bundle install it gives me an error jruby: No such file or directory -- bundle (LoadError) I am really stack with this error.. Please…
james raygan
  • 681
  • 5
  • 10
  • 28
14
votes
2 answers

Getting this error on precompiling assets: TypeError: couldn't digest ActiveSupport::StringInquirer

I'm a relatively new Rails programmer, and when I try to precompile assets (or even run the server sometimes), I get this error: TypeError: couldn't digest ActiveSupport::StringInquirer …
13
votes
4 answers

jruby on rails scheduling options

I'm using JRuby 1.5.6 on Rails to build myself an application that will periodically go away and retrieve any RSS podcasts that I have subscribed too. I've chosen JRuby primarily because I'm familiar with Java, wish to utilise the Rails framework…
Phil Ostler
  • 429
  • 3
  • 14
13
votes
2 answers

Already initialized constant in jruby-openssl

When running my rails application on torquebox, I get a lot of already initialized constant: ... warnings that originate from gems/jruby-openssl-0.8.2/lib/shared/jruby-openssl.rb:16. Is this a security problem? Is there any way to get rid of these…
panmari
  • 3,627
  • 3
  • 28
  • 48
13
votes
6 answers

How do I find my PID in Java or JRuby on Linux?

I need to find the PID of the current running process on a Linux platform (it can be a system dependent solution). Java does not support getting the process ID, and JRuby currently has a bug with the Ruby method, Process.pid. Is there another way…
Mike Stone
  • 44,224
  • 30
  • 113
  • 140
13
votes
16 answers

Advantages of Java over Ruby/JRuby

I am learning Java. I have learned and used Ruby. The Ruby books always tell the advantages of Ruby over Java. But there must be some advantages, that's why lots of people (especially companies) use Java and not Ruby. Please tell the absolute(not…
RubyDubee
  • 2,426
  • 2
  • 23
  • 34
13
votes
3 answers

How can we have a dynamically typed language over JVM?

We have Jython, JRuby, Groovy which are dynamically typed and runs over JVM. I understand that these languages compile to bytecode. Other languages such as Scala supports type inference, and its clear that the compiler infers the type for us. But…
18bytes
  • 5,951
  • 7
  • 42
  • 69
13
votes
5 answers

Ruby extract data from string using regex

I'm doing some web scraping, this is the format for the data Sr.No. Course_Code Course_Name Credit Grade Attendance_Grade The actual string that i receive is of the following form 1 CA727 PRINCIPLES OF COMPILER DESIGN 3 A M The things that I…
nikhil
  • 8,925
  • 21
  • 62
  • 102
12
votes
2 answers

What values for RUBY_ENGINE correspond to which Ruby implementations?

The method I know of to detect the Ruby implementation (e.g., MRI, JRuby, Rubinius, etc.) at run time is to check the global constant RUBY_ENGINE: $ ruby -e 'puts RUBY_ENGINE' ruby What's a reasonably comprehensive list of known Ruby…
jwfearn
  • 28,781
  • 28
  • 95
  • 122
12
votes
1 answer

SL4A vs Ruboto on Android Application Development

I am thinking about creating apps on Android using JRuby (or a suitable variant of Ruby for Android). According to my research there are two current projects that support Ruby development on Android: Ruboto SL4A From the FAQ of the Ruboto wiki on…
Nosh
  • 485
  • 7
  • 24
12
votes
5 answers

What does Mirah offer over JRuby,Groovy and Scala?

What does Mirah language offer over JRuby,Groovy and Scala?
Chiron
  • 20,081
  • 17
  • 81
  • 133
12
votes
1 answer

Implement different stratum for Java Debugger Interface

In the Java Debugger Interface documentation for the Location class, there's a paragraph discussing the "stratum" of the location. I've been looking around a bit for more detail on how one would go about implementing a new stratum (for, say, Scala…
jfager
  • 279
  • 1
  • 8