How to run a Ruby file without installing Ruby?

R

Rubyist

Let's suppose that I wrote a Ruby program which is incredibly
interesting, amazing, shocking and of course I want to let a friend of
mine see this wonderful program ;-D

But my friend is a so bad and ugly man that he doesn't want to install
Ruby on his comp :-(
However, I am so earnest that I still want to show my prog to him
anyway.

How can I do this?

AFAIK it's not possible to compile Ruby to an *.exe file (or is it, is
it?) Hence, can I make a "bundle" my prog together with some other Ruby
binaries (which ones?) and send them in a zip file?

Or, as an alternative, perhaps an *.exe file can be built with another
tool such as Delphi, C++ and "some" Ruby files (which files again?)
can be zipped with this "trigger" *.exe file?

BTW, unfortunately these miracles must be done on Windoze. Since I am a
poor Micro$oft user :-(

I'd be so glad if somebody help me.

Thanx in advance.
 
P

Patrick Hurley

Let's suppose that I wrote a Ruby program which is incredibly
interesting, amazing, shocking and of course I want to let a friend of
mine see this wonderful program ;-D

But my friend is a so bad and ugly man that he doesn't want to install
Ruby on his comp :-(
However, I am so earnest that I still want to show my prog to him
anyway.

How can I do this?

AFAIK it's not possible to compile Ruby to an *.exe file (or is it, is
it?) Hence, can I make a "bundle" my prog together with some other Ruby
binaries (which ones?) and send them in a zip file?

Or, as an alternative, perhaps an *.exe file can be built with another
tool such as Delphi, C++ and "some" Ruby files (which files again?)
can be zipped with this "trigger" *.exe file?

BTW, unfortunately these miracles must be done on Windoze. Since I am a
poor Micro$oft user :-(

I'd be so glad if somebody help me.

Thanx in advance.

Check out the wonderful gem rubyscript2exe sounds like exactly that
which you are seeking.

pth
 
R

Rubyist

{ > Check out the wonderful gem rubyscript2exe sounds like exactly that
which you are seeking.
pth }

Oh, I tried it on a WinXP system but I failed!
Here is what I've done:

1. I downloaded "rubyscript2exe.rb"
2. Made a trivial Ruby prog consisting only a puts "Hello"
3. I also copied a "init.rb" to same directory
4. And typed "ruby rubyscript2exe.rb blahblah.rb"

:-(

What did I do wrong? My native language isn't English and perhaps I
misunderstood the instructions on rubyscript2exe's website...
 
C

Craig Demyanovich

Let's suppose that I wrote a Ruby program which is incredibly
interesting, amazing, shocking and of course I want to let a friend of
mine see this wonderful program ;-D

But my friend is a so bad and ugly man that he doesn't want to install
Ruby on his comp :-(
However, I am so earnest that I still want to show my prog to him
anyway.

How can I do this?

If you can, just invite him to your machine to see it in action. If
not, is installing Ruby via the Windows one-click installer (http://
rubyinstaller.rubyforge.org/wiki/wiki.pl) that big a deal for your
friend? It doesn't get much easier than that (on Windows, anyway),
and the uninstaller works.

Craig
 
J

joesb

Rubyist said:
{ > Check out the wonderful gem rubyscript2exe sounds like exactly that

Oh, I tried it on a WinXP system but I failed!
Here is what I've done:

1. I downloaded "rubyscript2exe.rb"
2. Made a trivial Ruby prog consisting only a puts "Hello"
3. I also copied a "init.rb" to same directory
4. And typed "ruby rubyscript2exe.rb blahblah.rb"

:-(

What did I do wrong? My native language isn't English and perhaps I
misunderstood the instructions on rubyscript2exe's website...

Have you tried running the program without using rubyscript2exe? Does
it work?
I tried rubyscript2exe and it works fine. I have no idea what init.rb
is for since I didn't use one, I just run the program as is and
rubyscript2exe output the exe for me.
 
R

Rubyist

If you can, just invite him to your machine to see it in action. If
not, is installing Ruby via the Windows one-click installer (http://
rubyinstaller.rubyforge.org/wiki/wiki.pl) that big a deal for your
friend? It doesn't get much easier than that (on Windows, anyway),
and the uninstaller works.

Craig

Oh, it was just a sceneraio. Not reality. :-D
 
W

William James

Rubyist said:
Let's suppose that I wrote a Ruby program which is incredibly
interesting, amazing, shocking and of course I want to let a friend of
mine see this wonderful program ;-D

But my friend is a so bad and ugly man that he doesn't want to install
Ruby on his comp :-(
However, I am so earnest that I still want to show my prog to him
anyway.

How can I do this?

AFAIK it's not possible to compile Ruby to an *.exe file (or is it, is
it?) Hence, can I make a "bundle" my prog together with some other Ruby
binaries (which ones?) and send them in a zip file?

Or, as an alternative, perhaps an *.exe file can be built with another
tool such as Delphi, C++ and "some" Ruby files (which files again?)
can be zipped with this "trigger" *.exe file?

BTW, unfortunately these miracles must be done on Windoze. Since I am a
poor Micro$oft user :-(

If the Ruby program has no "require"s, it can be run in a dos-box
under windhose if the computer has in its path ruby.exe and
msvcrt-ruby18.dll.
 
A

Alex Combas

dGFua3MhCgpPbiAyLzE0LzA2LCBEYXZpZCBWYWxsbmVyIDxkYXZpZEB2YWxsbmVyLm5ldD4gd3Jv
dGU6Cj4gRMWIYSBVdG9yb2sgMTQgRmVicnXDoXIgMjAwNiAxNDowMyBSdWJ5aXN0IG5hcMOtc2Fs
Ogo+ID4gVGhhbngKPiBZb3Ugc3BlbGwgaXQgInRoYW5rcyIuIFdpdGggYSAia3MiLiBUaGF0J3Mg
YSBLLCBhbmQgYW4gUyBmb2xsb3dpbmcgaXQuIE5vdCBYLgo+IFdlIGtub3cgd2hlcmUgeW91IGxp
dmUsIGFuZCB3ZSBhcmUgZGVhZCBwaXNzZWQgeW91IGNhbid0IGV2ZW4gdXNlIHByb3Blcgo+IEVu
Z2xpc2ggd2hlbiBhc2tpbmcgZm9yIGhlbHAuCj4KPiBUaGUgUGVkYW50cyBvZiB0aGUgVW5pdmVy
c2UgQXNzb2NpYXRpb24KPiBTcGVjaWFsIE9wZXJhdGlvbnMgRm9yY2UgZm9yIHRoZSBFbGltaW5h
dGlvbiBvZiBMZWV0c3BlYWsKPgo+IFBTOiBUaGFua3MgZ28gdG8gYW5uZSBmb3IgdGhlIHRyeXJ1
Ynkgd2Vic2l0ZSwgZGlkbid0IGtub3cgb2YgdGhhdCBvbmUuIEJleW9uZAo+IGhvdCwgYW5kIHNv
IFdlYiAyLjAgaXQgbWFrZXMgb25lJ3MgZm94ZXMgc21va2UuCj4KPgoKCi0tCkFsZXggQ29tYmFz
Cmh0dHA6Ly9ub29kbGVqdW5raWUuYmxvZ3Nwb3QuY29tLwo=
 
R

Rubyist

We know where you live,

How smart you are...
Thanx
You spell it "thanks". With a "ks". That's a K, and an S following it. Not X.
..., and we are dead pissed you can't even use proper English when asking for help.

As I mentioned before, my native language ain't English (like other
5,500,000,000 people on thiz planet), thus I kannot understand the
phrase "dead pissed". Kould you pleaze eksplain it?
 
S

Seth Thomas Rasmussen

Rubyist said:
Let's suppose that I wrote a Ruby program which is incredibly
interesting, amazing, shocking and of course I want to let a friend of
mine see this wonderful program ;-D

But my friend is a so bad and ugly man that he doesn't want to install
Ruby on his comp :-(
However, I am so earnest that I still want to show my prog to him
anyway.

How can I do this?

CD?
 
A

Adam Shelly

ng for help.

As I mentioned before, my native language ain't English (like other
5,500,000,000 people on thiz planet), thus I kannot understand the
phrase "dead pissed". Kould you pleaze eksplain it?


In the English part of the English-speaking world, 'pissed' is slang
for 'drunk', and 'dead drunk' means "completely intoxicated". Why is
all the bad spelling making him drink so much? We may never know...
 
D

David Vallner

D=C5=88a Streda 15 Febru=C3=A1r 2006 08:43 Rubyist nap=C3=ADsal:
As I mentioned before, my native language ain't English (like other
5,500,000,000 people on thiz planet), thus I kannot understand the
phrase "dead pissed". Kould you pleaze eksplain it?

Neither is mine, and that wasn't a misspelling. Why is it everyone who feel=
s=20
using leetspeak will make him sound all that rad starts with the "I'm not=20
English" excuse once someone points out it's merely stupid? The word "thank=
s"=20
is so elementary that everyone that can make a complete English sentence ca=
n=20
spell it properly, so I'm not buying that.

David Vallner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top