Possible to include ruby in app?


#1

Is it possible to use ruby based apps in Atom-Shell? Meaning, can a self contained copy of ruby and any required gems be included somehow?


#2

I’m pretty certain it could, yes. But you’re now adding the cost of a third runtime being loaded (Chromium, Node and then Ruby) and having to come up with a method for marshaling information and calling code between Node and Ruby.


#3

You could consider using Opal to compile your Ruby code into JavaScript and then execute that.

To give you an example of this done, there’s a proof-of-concept Shoes4 backend that uses Ruby, Opal and atom-shell. You can find it here


#4

You can use the traveling ruby project. http://phusion.github.io/traveling-ruby/

see the Rakefile, and tasks, in the Brief Gem which I have packaged along with a node-webkit / electron project and got the expected result.

Currently I’m working on a slim / sass / scss live reload editor and using traveling ruby to package up sprockets etc.

Definitely doable. There’s some things to consider though. Gems with native extensions are one area.