How to run a Ruby file without installing Ruby?

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 :frowning:
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 :frowning:

I’d be so glad if somebody help me.

Thanx in advance.

On 2/14/06, Rubyist [email protected] wrote:

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

{ > 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”

:frowning:

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

On Feb 14, 2006, at 8:03 AM, Rubyist wrote:

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 :frowning:
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

On 2/14/06, Rubyist [email protected] wrote:

  1. And typed “ruby rubyscript2exe.rb blahblah.rb”

:frowning:

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

Use the gem:

gem install rubyscript2exe

Then run/build your app:

rubyscript2exe hello.rb

poof you should have a hello.exe if not cut and paste the errorse
and we can try again

pth

Rubyist wrote:

  1. And typed “ruby rubyscript2exe.rb blahblah.rb”

:frowning:

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.

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

how about try ruby?
http://tryruby.hobix.com/

DÅ?a Utorok 14 Február 2006 14:03 Rubyist napísal:

Thanx
You spell it “thanks”. With a “ks”. That’s a K, and an S following it.
Not X.
We know where you live, and we are dead pissed you can’t even use proper
English when asking for help.

The Pedants of the Universe Association
Special Operations Force for the Elimination of Leetspeak

PS: Thanks go to anne for the tryruby website, didn’t know of that one.
Beyond
hot, and so Web 2.0 it makes one’s foxes smoke.

Rubyist wrote:

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

Try this:

  1. gem install rubyscript2exe
  2. rubyscript2exe blah.rb blah.exe
  3. blah.exe

Cheers,
Antonio

Rubyist wrote:

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 :frowning:

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.

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. :smiley:

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?

tanks!

Rubyist wrote:

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 :frowning:
However, I am so earnest that I still want to show my prog to him
anyway.

How can I do this?

CD?

On 2/14/06, Rubyist [email protected] wrote:

…, 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?

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Å?a Streda 15 Február 2006 08:43 Rubyist napísal:

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
feels
using leetspeak will make him sound all that rad starts with the “I’m
not
English” excuse once someone points out it’s merely stupid? The word
“thanks”
is so elementary that everyone that can make a complete English sentence
can
spell it properly, so I’m not buying that.

David V.

DÅ?a Streda 15 Február 2006 19:36 Adam S. napísal:

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…

Mwah.
US vs. British doesn’t count.

David V.