[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to run a Ruby file without installing Ruby?

Rubyist

2/14/2006 1:03:00 PM

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.

13 Answers

Patrick Hurley

2/14/2006 1:14:00 PM

0

On 2/14/06, Rubyist <nuby.ruby.programmer@gmail.com> 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?
>
> 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


Rubyist

2/14/2006 1:35:00 PM

0

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

2/14/2006 2:39:00 PM

0


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


joesb.coe9

2/14/2006 4:22:00 PM

0


Rubyist wrote:
> { > 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...

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

2/14/2006 7:13:00 PM

0

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

Antonio Cangiano

2/14/2006 7:37:00 PM

0

Rubyist wrote:
> 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...

Try this:
1. gem install rubyscript2exe
2. rubyscript2exe blah.rb blah.exe
3. blah.exe

Cheers,
Antonio
--
Zen and the Art of Ruby Programming
http://antonioca...

Rubyist

2/14/2006 10:31:00 PM

0


> 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 James

2/14/2006 10:42:00 PM

0

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?
>
> 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 Combas

2/15/2006 6:56:00 AM

0

tanks!On 2/14/06, David Vallner <david@vallner.net> wrote:> Dna 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.>>--Alex Combashttp://noodlejunkie.blo...

Rubyist

2/15/2006 7:43:00 AM

0

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