What were the reasons for using JRuby over MRI / YARV?

Q Is there an advantage to running JRuby if you don’t know Java? , people have suggested using JRuby if you just want to implement Ruby better than Ruby (MRI / YARV).

What are the potential reasons to use JRuby?

What others talked about include:

  • Performance for short programs. JRuby is described as faster for longer programs, but with a longer initialization time. Workarounds are discussed in this matter .
  • C Extensions: JRuby supports some, but not all , C extensions that are used with MRI / YARV.
  • Concurrency as a double-edged sword. There is non-threaded code there that people did not find, because the most popular implementation does not have true concurrency.
  • JRuby may use more memory .
  • JRuby has decided not to do certain things that CRUBY does. This includes continuations (which I think are deprecated in CRuby) and fork. They also have another full-time endian and time accuracy.
  • JRuby does not include ObjectSpace by default .

Potential reasons why I include:

  • The libraries you use may not be designed to work under JRuby. For example, BioRuby, which has 127 watchers and 60 forks on GitHub, had a slight incompatibility with JRuby.
  • Fear, uncertainty, and doubt about using a less popular implementation. I know that JRuby passes RubySpec better than CRuby, but RubySpec is not complete yet.

Are there other reasons why you will not use JRuby?

+7
ruby jruby
source share
2 answers

Personally, while it is installed on a Mac, I do not always install Java on my Linux machines.

As an aside, RVM should probably be mentioned here as a canonical way to intercept several (8 or more!) Different Ruby translators.

+1
source share

JRuby doesn't seem to give $ SAFE high priority. Blog post since 2007, but since then I have not come across any changes.

0
source share

All Articles