PDA

View Full Version : Portable Ruby?


Iriel
October 14th, 2005, 04:22 PM
I know this may sound relatively insane, but does anyone know of a way to carry a sort of 'portable ruby server'? I didn't think anything like that was possible until I found Uniform Server (http://www.uniformserver.com) to run a WAMP setup from a flash drive.

The reason I ask is that the computer I have the most time to develop on is locked, so I can't install ruby, much less the rails framework. However, this is the easiest place to have time to code. If anyone knows of any sort of 'portable ruby' or even an online ruby interpreter (so I know if I'm doing it right) please let me know.

bluetechnx
October 14th, 2005, 06:20 PM
As a matter of fact I use AllInOneRuby from my usb drive every day for school and some kermudging around in work also!

AllInOneRuby is basically an executable (which can be made for Windows or Un*x) that has all of ruby compressed within it...and when you run allinoneruby.exe it extracts the contents to a temp directory on your system to run your program.

It's pretty slick. I use the following when making allinoneruby:
ruby allinoneruby.rb ruby.exe --site

this invocation creates a ruby.exe with all of standard ruby contained in it and any modules in the SITE_LIB of the ruby path.

...It's as portable a copy of ruby I can find, without having to install all of ruby.

...it does take a while to 'startup' and run your app (because of needing to extract the exe to a temp dir)

It can be found here: http://raa.ruby-lang.org/project/allinoneruby/