Hacker News new | ask | show | jobs
by haven 1777 days ago
TruffleRuby supports many C extensions like DB adapters out of the box like CRuby. JRuby has Java ports for most popular gems that ship alongside them. Nokogiri is one gem that's a Rails dependency and stands out as a bit of a pain, but both JRuby and TruffleRuby put in substantial effort to support it too. All three generally work with web servers, including Puma, which ships with Rails. There are still gaps in C extensions that TruffleRuby covers and lack of Java ports for less popular but still used gems. They may have some things like gRPC C extensions that don't work and they don't want to port them either. Generally the ecosystem just works between these popular Ruby implementations.

MRuby uses MGems and is just a different ecosystem entirely. It has parallel libraries but they're not shared with the above implementations.

1 comments

So why the relative lack of popularity for JRuby/Truffle? I know about startup time and a degraded dev experience (compile/restart server etc is slower). Are these the major pain points? Or is it simply that most Ruby shops have a good enough performance and they're not looking for anything else?
Very slow startup and the compatibility isn't 100%. You don't get the latest Ruby features and every once in a while, code that would work on CRuby doesn't work out of the box. It's kind of a similar situation with PyPy as far as I can tell. It's been around for a long time but not much adoption.