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?
on 2013-02-19 12:54
on 2013-02-20 05:37
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
on 2013-02-20 13:10
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! ;-)
on 2013-02-20 16:21
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.
on 2013-02-20 17:51
Vincent Carmona 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?
on 2013-02-20 21:17
>> 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 http://sourceforge.net/projects/gtk-win/files/ > 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"
on 2013-02-21 11:20
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 http://sourceforge.net/projects/gtk-win/files/ > >> 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
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.