A newbie question:how to pack it into .exe file

hello,i am a newbie learner of RB and visualruby

I found it difficult for me to trans a visualruby program(.rb&.glade)
into a .exe file which could run correctly in win7 .

Now i could only use
exerb for a simple ruby program(.rb).

would anyone kindly help me about that?

Hi:

The way to distribute programs is to package them as rubygems. You need
to make an executable file in the rubygem, and when the gem is
installed, the user can run the program by typing the filename at the
command prompt. For example, the visualruby program has a file named
“vr” that installs in the gem directory. So when a user types “vr” at
the command prompt, visualruby runs.

In visualruby, create a gemspec file, and make an executable file. For
more info:

rubygems.org

has documentation.

The gemspecs are a bit confusing because everything is allowed to have a
different name (the program, the executable, the project and the gem).
Try using the visualruby examples to learn.

Good luck,
Eric

Eric C. wrote in post #1097900:

Hi:

The way to distribute programs is to package them as rubygems. You need
to make an executable file in the rubygem, and when the gem is
installed, the user can run the program by typing the filename at the
command prompt. For example, the visualruby program has a file named
“vr” that installs in the gem directory. So when a user types “vr” at
the command prompt, visualruby runs.

In visualruby, create a gemspec file, and make an executable file. For
more info:

rubygems.org

has documentation.

The gemspecs are a bit confusing because everything is allowed to have a
different name (the program, the executable, the project and the gem).
Try using the visualruby examples to learn.

Good luck,
Eric

hello,Eric,thank you for your kind answer.
But I am afraid that you may misunderstand what i meant.
To make the question clear:
Could somebody use my vr-program without installing ruby?How?
BTW:
I got another quention:When I run the vr-program(by “ruby main.rb”),I
got a really big cmd-window.
How can I get rid of it?

Thanks again for your help! :wink:

Vincent C. wrote in post #1097983:

No.
But in theory you can package your program and your dependencies
including
ruby in one big windows installation file.
See http://rubyscript2exe.rubyforge.org/ for example.

Thanks!it helps me a lot

I got another question:
When I run the vr-program(not by “ruby main.rb” but by double-click),I
got a cmd-window behind my gui.

How can I get rid of it?

ruby in one big windows installation file.

On windows, Ocra do all : ruby executable embeded, gem too.
But i think that Gtk/glade must be installed by thinks
like GTK+2 for Windows Runtime Environment - Browse Files at SourceForge.net

When I run the vr-program(not by “ruby main.rb” but by double-click),I
got a cmd-window behind my gui.

Rubyw.exe run ruby without console.
for running rubyw on click, rename main.rb by main.rbw

or you can use hstart :

hstart /noconsole “ruby main.rb”

Regis d’Aubarede wrote in post #1098049:

ruby in one big windows installation file.

On windows, Ocra do all : ruby executable embeded, gem too.
But i think that Gtk/glade must be installed by thinks
like GTK+2 for Windows Runtime Environment - Browse Files at SourceForge.net

When I run the vr-program(not by “ruby main.rb” but by double-click),I
got a cmd-window behind my gui.

Rubyw.exe run ruby without console.
for running rubyw on click, rename main.rb by main.rbw

or you can use hstart :

hstart /noconsole “ruby main.rb”

Thank you!
It works.
;-D

Hi.

hello,Eric,thank you for your kind answer.
But I am afraid that you may misunderstand what i meant.
To make the question clear:
Could somebody use my vr-program without installing ruby?How?

No.
But in theory you can package your program and your dependencies
including
ruby in one big windows installation file.
See http://rubyscript2exe.rubyforge.org/ for example.