Ruby on USB stick for Windows? And linux :D

Is it possible to run ruby on an USB stick?

I can not hdinstall it on the machine (an old win 7 machine). I am not
supposed to make any changes to it.

BUT, I have so many ruby scripts and working with ruby is a 100000x
better than having to use drag-and-drop items or the DOS cmd.exe thingy.

So my question is - can I like install ruby on USB stick, with addons
(gems, and my files) and have that working?

Ideally to also have this work on Linux too, so I could be really
portable and keep the latest ruby-version + my changesets on a small USB
device. That would be swell.

Marc H. [email protected] wrote:

So my question is - can I like install ruby on USB stick, with addons
(gems, and my files) and have that working?

No idea about Windows; but on Linux (and probably any *nix), I bet you
can just ./configure it with --prefix=/path/to/usb/stick/mountpoint Be
sure to use the same mountpoint on all Linux machines of the same
architecture. Just make sure you allow executing code on the
mountpoint.

I sometimes do something similar with rsync. I’ll build + install Ruby
trunk on a fast machine (in $HOME/r/trunk or similar) and rsync it over
to a slower machine (using the exact same path names on both machines).

Am 19.01.2014 03:13, schrieb Marc H.:

So my question is - can I like install ruby on USB stick, with addons
(gems, and my files) and have that working?

Yes. I did this once with the 7z files provided by the RubyInstaller
team, which do not have any hardcoded dependencies (not even registry
entries). As long as you set up the PATH environment variable correctly,
it should just work™. I even combined it with the MSYS environment from
the MinGW project and Console2, so I had a pretty *nix-ish feeling on
Windows.

Vale,
Marvin


Blog: http://www.quintilianus.eu

I will reject HTML emails. | Ich akzeptiere keine HTML-Nachrichten.
|
Use GnuPG for mail encryption: | GnuPG für Mail-Verschlüsselung:
http://www.gnupg.org | The GNU Privacy Guard

I’ve been running ruby from a flash drive on win 7 without any problem

Tom R.