Need advice about which tool to choose?Ask the StackShare community!

JRuby

81
78
+ 1
30
Ruby

22.1K
13.9K
+ 1
3.9K
Add tool

JRuby vs Ruby: What are the differences?

Developers describe JRuby as "A high performance, stable, fully threaded Java implementation of the Ruby programming language". JRuby is the effort to recreate the Ruby (http://www.ruby-lang.org) interpreter in Java. The Java version is tightly integrated with Java to allow both to script any Java class and to embed the interpreter into any Java application. See the docs directory for more information. On the other hand, Ruby is detailed as "A dynamic, interpreted, open source programming language with a focus on simplicity and productivity". Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming.

JRuby and Ruby belong to "Languages" category of the tech stack.

"Java" is the top reason why over 7 developers like JRuby, while over 590 developers mention "Programme friendly" as the leading cause for choosing Ruby.

JRuby and Ruby are both open source tools. It seems that Ruby with 15.9K GitHub stars and 4.25K forks on GitHub has more adoption than JRuby with 3.32K GitHub stars and 830 GitHub forks.

According to the StackShare community, Ruby has a broader approval, being mentioned in 2530 company stacks & 1140 developers stacks; compared to JRuby, which is listed in 13 company stacks and 4 developer stacks.

Decisions about JRuby and Ruby
Ing. Alvaro Rodríguez Scelza
Software Systems Engineer at Ripio · | 11 upvotes · 50K views

I was considering focusing on learning RoR and looking for a work that uses those techs.

After some investigation, I decided to stay with C# .NET:

  • It is more requested on job positions (7 to 1 in my personal searches average).

  • It's been around for longer.

  • it has better documentation and community.

  • One of Ruby advantages (its amazing community gems, that allows to quickly build parts of your systems by merely putting together third party components) gets quite complicated to use and maintain in huge applications, where building and reusing your own components may become a better approach.

  • Rail's front end support is starting to waver.

  • C# .NET code is far easier to understand, debug and maintain. Although certainly not easier to learn from scratch.

  • Though Rails has an excellent programming speed, C# tends to get the upper hand in long term projects.

I would avise to stick to rails when building small projects, and switching to C# for more long term ones.

Opinions are welcome!

See more
Timm Stelzer
Software Engineer at Flexperto GmbH · | 18 upvotes · 116K views

We have a lot of experience in JavaScript, writing our services in NodeJS allows developers to transition to the back end without any friction, without having to learn a new language. There is also the option to write services in TypeScript, which adds an expressive type layer. The semi-shared ecosystem between front and back end is nice as well, though specifically NodeJS libraries sometimes suffer in quality, compared to other major languages.

As for why we didn't pick the other languages, most of it comes down to "personal preference" and historically grown code bases, but let's do some post-hoc deduction:

Go is a practical choice, reasonably easy to learn, but until we find performance issues with our NodeJS stack, there is simply no reason to switch. The benefits of using NodeJS so far outweigh those of picking Go. This might change in the future.

PHP is a language we're still using in big parts of our system, and are still sometimes writing new code in. Modern PHP has fixed some of its issues, and probably has the fastest development cycle time, but it suffers around modelling complex asynchronous tasks, and (on a personal note) lack of support for writing in a functional style.

We don't use Python, Elixir or Ruby, mostly because of personal preference and for historic reasons.

Rust, though I personally love and use it in my projects, would require us to specifically hire for that, as the learning curve is quite steep. Its web ecosystem is OK by now (see https://www.arewewebyet.org/), but in my opinion, it is still no where near that of the other web languages. In other words, we are not willing to pay the price for playing this innovation card.

Haskell, as with Rust, I personally adore, but is simply too esoteric for us. There are problem domains where it shines, ours is not one of them.

See more
Andrew Carpenter
Chief Software Architect at Xelex Digital, LLC · | 16 upvotes · 123.7K views

In 2015 as Xelex Digital was paving a new technology path, moving from ASP.NET web services and web applications, we knew that we wanted to move to a more modular decoupled base of applications centered around REST APIs.

To that end we spent several months studying API design patterns and decided to use our own adaptation of CRUD, specifically a SCRUD pattern that elevates query params to a more central role via the Search action.

Once we nailed down the API design pattern it was time to decide what language(s) our new APIs would be built upon. Our team has always been driven by the right tool for the job rather than what we know best. That said, in balancing practicality we chose to focus on 3 options that our team had deep experience with and knew the pros and cons of.

For us it came down to C#, JavaScript, and Ruby. At the time we owned our infrastructure, racks in cages, that were all loaded with Windows. We were also at a point that we were using that infrastructure to it's fullest and could not afford additional servers running Linux. That's a long way of saying we decided against Ruby as it doesn't play nice on Windows.

That left us with two options. We went a very unconventional route for deciding between the two. We built MVP APIs on both. The interfaces were identical and interchangeable. What we found was easily quantifiable differences.

We were able to iterate on our Node based APIs much more rapidly than we were our C# APIs. For us this was owed to the community coupled with the extremely dynamic nature of JS. There were tradeoffs we considered, latency was (acceptably) higher on requests to our Node APIs. No strong types to protect us from ourselves, but we've rarely found that to be an issue.

As such we decided to commit resources to our Node APIs and push it out as the core brain of our new system. We haven't looked back since. It has consistently met our needs, scaling with us, getting better with time as continually pour into and expand our capabilities.

See more
Pros of JRuby
Pros of Ruby
  • 8
    Java
  • 6
    Faster than Ruby
  • 3
    JVM
  • 2
    Built-in Testing
  • 2
    Deploy as executable jay
  • 2
    Open source
  • 2
    Supports native Ruby gems out the box
  • 2
    Threads
  • 2
    Garbage collection built-in
  • 1
    Great community
  • 598
    Programme friendly
  • 532
    Quick to develop
  • 488
    Great community
  • 466
    Productivity
  • 430
    Simplicity
  • 272
    Open source
  • 234
    Meta-programming
  • 203
    Powerful
  • 157
    Blocks
  • 138
    Powerful one-liners
  • 65
    Flexible
  • 56
    Easy to learn
  • 48
    Easy to start
  • 40
    Maintainability
  • 36
    Lambdas
  • 30
    Procs
  • 19
    Fun to write
  • 19
    Diverse web frameworks
  • 11
    Reads like English
  • 8
    Rails
  • 8
    Makes me smarter and happier
  • 7
    Elegant syntax
  • 6
    Very Dynamic
  • 5
    Programmer happiness
  • 5
    Matz
  • 4
    Generally fun but makes you wanna cry sometimes
  • 4
    Fun and useful
  • 3
    Friendly
  • 3
    Object Oriented
  • 3
    There are so many ways to make it do what you want
  • 2
    Easy packaging and modules
  • 2
    Primitive types can be tampered with
  • 2
    Elegant code

Sign up to add or upvote prosMake informed product decisions

Cons of JRuby
Cons of Ruby
    Be the first to leave a con
    • 7
      Memory hog
    • 7
      Really slow if you're not really careful
    • 3
      Nested Blocks can make code unreadable
    • 2
      Encouraging imperative programming
    • 1
      Ambiguous Syntax, such as function parentheses

    Sign up to add or upvote consMake informed product decisions

    What is JRuby?

    JRuby is the effort to recreate the Ruby (http://www.ruby-lang.org) interpreter in Java. The Java version is tightly integrated with Java to allow both to script any Java class and to embed the interpreter into any Java application. See the docs directory for more information.

    What is Ruby?

    Ruby is a language of careful balance. Its creator, Yukihiro “Matz” Matsumoto, blended parts of his favorite languages (Perl, Smalltalk, Eiffel, Ada, and Lisp) to form a new language that balanced functional programming with imperative programming.

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use JRuby?
    What companies use Ruby?

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with JRuby?
    What tools integrate with Ruby?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    Nov 20 2019 at 3:38AM
    https://img.stackshare.io/stack/517248/default_4bf5f3d2d3ef627f563fd3b2e94dee6cc37a38d6.jpg logo

    OneSignal

    PostgreSQLRedisRuby+8
    7
    3626
    Oct 24 2019 at 7:43PM
    https://img.stackshare.io/stack/513891/default_86b138c409d64e353c3d509121b4ac1dd9cf31c4.png logo

    AppSignal

    JavaScriptNode.jsJava+8
    5
    660
    Jun 6 2019 at 5:11PM
    https://img.stackshare.io/stack/372376/default_573a26a621134fbcbde85e58b2c8544189ae0fba.jpg logo

    AppSignal

    RedisRubyKafka+9
    15
    1043
    GitHubDockerReact+17
    32
    27074
    What are some alternatives to JRuby and Ruby?
    Groovy
    Groovy builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk. It makes modern programming features available to Java developers with almost-zero learning curve.
    Rails
    Rails is a web-application framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.
    Go
    Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
    Java
    Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!
    JavaScript
    JavaScript is most known as the scripting language for Web pages, but used in many non-browser environments as well such as node.js or Apache CouchDB. It is a prototype-based, multi-paradigm scripting language that is dynamic,and supports object-oriented, imperative, and functional programming styles.
    See all alternatives
    Interest over time
    News about JRuby
    More news