Forum: Ruby How to run a Ruby file without installing Ruby?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Rubyist (Guest)
on 2006-02-14 16:13
(Received via mailing list)
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.
Patrick H. (Guest)
on 2006-02-14 16:13
(Received via mailing list)
On 2/14/06, Rubyist <removed_email_address@domain.invalid> 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
Rubyist (Guest)
on 2006-02-14 16:13
(Received via mailing list)
{ > 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...
Craig D. (Guest)
on 2006-02-14 16:42
(Received via mailing list)
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 :-(
> 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
Patrick H. (Guest)
on 2006-02-14 17:10
(Received via mailing list)
On 2/14/06, Rubyist <removed_email_address@domain.invalid> wrote:
> 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...
>
>
>

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
joesb (Guest)
on 2006-02-14 18:26
(Received via mailing list)
Rubyist wrote:
> 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.
anne001 (Guest)
on 2006-02-14 21:16
(Received via mailing list)
> > 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/
Antonio C. (Guest)
on 2006-02-14 21:40
(Received via mailing list)
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
David V. (Guest)
on 2006-02-14 23:02
(Received via mailing list)
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 (Guest)
on 2006-02-15 00:36
(Received via mailing list)
> 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
William J. (Guest)
on 2006-02-15 00:45
(Received via mailing list)
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 :-(

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.
Alex C. (Guest)
on 2006-02-15 08:57
(Received via mailing list)
tanks!
Rubyist (Guest)
on 2006-02-15 09:45
(Received via mailing list)
> 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?
Seth Thomas R. (Guest)
on 2006-02-15 17:39
(Received via mailing list)
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 :-(
> However, I am so earnest that I still want to show my prog to him
> anyway.
>
> How can I do this?

CD?
Adam S. (Guest)
on 2006-02-15 20:38
(Received via mailing list)
On 2/14/06, Rubyist <removed_email_address@domain.invalid> 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...
David V. (Guest)
on 2006-02-16 00:08
(Received via mailing list)
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...
>

http://pissed.urbanup.com/1437970

Mwah.
US vs. British doesn't count.

David V.
David V. (Guest)
on 2006-02-16 01:54
(Received via mailing list)
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.
This topic is locked and can not be replied to.