From: Dennis Ranke Date: 2007-07-06T23:35:30+09:00 Subject: Re: Oh the pain! Distributing Ruby apps Sharon Phillips wrote: > Hi, > > I've written some small Ruby apps for monitoring things at work but am > not enjoying distributing them. > Seems for each person I have to install Ruby, then the extra libraries I > use (currently just ori8 and net-ssh). I'd like to write a gui front > end, but shudder at the thought of then having to install qt / fox / > whatever. > > Am I missing something here? Do I have to do this for each machine in > order to just let someone else run a Ruby script? Actually, ruby doesn't need any fancy installation on windows to run code, you just need the interpreter and the libraries your code uses in a directory structure that mirrors the one the one-click installer creates. Ie. something like this: ruby\ bin\ ruby.exe msvcrt-ruby18.dll ...other dlls... lib\ ruby\ 1.8\... site_ruby\... Of course, as long as you don't associate this ruby.exe with .rb files, you can't run those files directly, but you can create a .cmd for each of your tools, that just does something along the lines of c:\some\path\ruby\bin\ruby.exe myscript.rb %* and just tell your users to run that cmd file. > How can I lessen the pain? > Is it possible to install the libraries on the LAN and each machine run > them from there? You could of course try out putting this directory structure on some shared disc. As far as I can see, this should work just as well, just remember that you won't be able to update an .exe or .dll as long as some program using it is running. Hope this helps, Dennis