Providing my Ruby program as an all-in-one installer - ruby

I have written a short program in a ruby file that runs correctly on my PC. However I need to find a way to give this to my colleagues to use. They have no knowledge of ruby. The program requires various non standard gems. What is the best way to provide them with a one click installer for my program, including all the gems and ruby itself.

Try OCRA - it packages everything into a single executable (no installation required).
When you run the executable, it extracts everything into a temporary directory (including the ruby interpreter) and runs your script from this directory.

I havn't use it (so I don't know if it works), but you can try to use RubyScript2Exe

Related

How to compile .lua into Windows .exe?

Question related to Windows platform only.
I can't find documentation on how to approach this.
There are dozens of posts about this, yet most provide answers for mac/linux, most windows specific parts lead to dead links or README's that have no useful information.
How do I, for example, make an .exe of the code below? The intent being to share it with another windows user, so that when they click it...it automatically runs the program in command prompt or wherever .exe are supposed to run without them needing to have lua/luac installed on their system.
Or perhaps I'm missing the point here and you need lua/luac installed, otherwise you would need to convert to a program language that's already installed on everyones' windows systems like C...? Regardless I need something that works for the purpose described. Could I make a folder with lua.exe and luac.exe and input.lua and make an .exe that loads command prompt and runs the command to compile input.lua? new_folder: lua.exe, luac.exe, input.lua, run.exe
> --input.lua
print("type ur name")
name=io.read()
print(#name)
print("your name is " name)
I'm not aware of anything in wxlua that can compile a lua file into an executable. There is wxLuaFreeze executable that allows to concatenate a lua script to it to generate a new executable that will run that script when executed. See the documentation for details: http://wxlua.sourceforge.net/docs/wxlua.html#C7.3.

how to make perl script into installer exe or msi

I am creating the perl script/programming's and converting into *.EXE by Perlapp perl development kit (PDK) application however I want to know whether the same application can use to make the *EXE as an Installer or MSI. Or else we have any other applications to use the perl script to make the same.
I would appreciate if someone guide me on this one.
I want to know whether the same application can use to make the *EXE as an Installer or MSI
No. It can't
This is a foolish question
Making an executable out of a Perl source file is mostly a matter of combining a copy of the perl executable with the Perl code and all of its dependencies
Creating an installer requires at least a number of checks to make sure that the target system can support the installed software, a design to choose where on the target system each element of the installation should be placed, and some code to tidy the system after the installation is done
It is also necessary to write and install an uninstaller program that will safely and securely undo every change that the installer has made
It isn't sensible to expect any utility that creates an executable file of any sort to be able to also take all of this into consideration and to create something that will run correctly on a completely alien system

How to produce a self contained Ruby "executable"?

I have some simple Ruby scripts that I would like to distribute to coworkers. They are not very complex, but they involve many files and a directory architecture, thus I would like to be able to automatically "group" all of that in a single file to ease the distribution.
Is there any Ruby tool that would automate that ? I don't need a binary, that can be another Ruby script.
You can use ocra. It will package your script into an executable. It is windows-only though. http://ocra.rubyforge.org/

Ruby File.exists?(path) lies to me

I've got a Ruby program that keeps telling me that various files do not exist when it runs.
The paths are absolute, and the files do exist at the time the program runs. When the program is runĀ again, everything works fine. There is absolutely nothing special about the code, and it works for thousands of other files at the same time, just not certain files at certain times, apparently.
It's Ruby 1.8.7 on latest stable Cygwin on Windows 2003.
What could possibly be going on here?
If you're on cygwin, maybe you're using the wrong type of slashes? (forward vs. back)
Try something simple to experiment. Make a test file somewhere and try a bunch of ways to get to it.
File.exists?('c:/test.txt')
File.exists?('c:\test.txt')
File.exists?('/test.txt')
File.exists?('\test.txt')
(I don't know windows/cygwin so I don't know what the full space of things to try would be)

Emacs function to load a site-start.d directory on Mac?

Other systems such as Debian have code to load individual files inside /etc/emacs/site-start.d at startup. Now after install Magit using Homebrew there are files in /usr/local/etc/emacs/site-start.d that should be loaded at Emacs startup. Does stock Emacs have a function to do this, or must the functionality be ported from debian-startup.el?
If you don't know exactly what is being talked about here, please don't suggest arbitrary Elisp snippets to load files from a directory. Thank you!
/etc/emacs/site-start.d is a Debian addition to the load-path and startup process. I'm not sure whether it is self-contained in debian-startup.el, but /usr/local/share/emacs/site-lisp/site-start.el would be the standard location where something similar could be done (by using an arbitrary snippet to load files from a directory).

Resources