Answer the question
In order to leave comments, you need to log in
Building a standalone ruby application for various operating systems (Windows, Mac, Linux). Any working solutions?
There is a simple ruby parser that uses gem nokogiri and consists of just one .rb script.
Is it possible to build an application from it for standalone use in various operating systems (Windows, Mac, Linux)?
I myself work on Mac OS X, so solutions based on the ocra gem did not start. I tried the releasy gem, but it didn't want to bundle nokogiri into any, and besides, it seems to be abandoned and there is terribly little information on it. I tried the Platypus.app software, it bandits the script normally, but in the end nothing works, the program starts and immediately stops.
Are there any working solutions?
Answer the question
In order to leave comments, you need to log in
Building a separate application is just packing the interpreter, all the gems and your script into something like an autorun SFX archive. When you run it on the target platform, all this is unpacked into a temporary folder and ruby.exe is launched with a set of keys. At least that's how all the ruby "exe" creation tools I've seen worked. In addition, there is no cross-assembly, and to build the Windows version, you need Windows, for Macos - Macos, etc. In general, this is not the best way to launch your application from the command line.
Typically, such an application is packaged in a gem (in your case, with a dependency on nokogiri) and all this is provided with instructions on how to install ruby and your gem on different OSes. You may also have to describe how to install dependencies if they are not installed without problems. In your case, everything is simple, nokogiri already has detailed installation instructions.
In general, there are no more options?
Maybe it's even possible to cram all this into binary code somehow? Collect the console application?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question