To convert a Ruby tk script to *.exe

Hi,

I am building a gui for ruby using Tk. I built one and I would like to
convert that into *.exe file. Can anyone suggest me how can I do
that?
I tried using Ocra, but I was not successful

When I tried using ocra I got some error messages. The normal programs I
was able to convert easily without any problem using ocra, but for the
tk scripts I couldnt do so. I have attached the screenshot of error
messages that I got.

2011/11/11 Manju M. [email protected]:

I tried using Ocra, but I was not successful

What precisely was your problem? I’ve never really had trouble with
Ocra.

– Matma R.

Oh… Sorry. Please have a look at this one.

Attachments:
http://www.ruby-forum.com/attachment/6741/screenshot.png

This screenshot is missing the top, with the actual error…

– Matma R.

-----Messaggio originale-----
Da: Manju M. [mailto:[email protected]]
Inviato: luned 14 novembre 2011 05:30
A: ruby-talk ML
Oggetto: Re: To convert a Ruby tk script to *.exe

Oh… Sorry. Please have a look at this one.

Attachments:


Posted via http://www.ruby-forum.com/.


Caselle da 1GB, trasmetti allegati fino a 3GB e in piu’ IMAP, POP3 e
SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Capodanno al parco Oltremare Riccione: Pacchetto hotel 3 stelle in
centro + ingresso al parco.

Maybe too late but the thing to do is to copy the ruby file you wish to
compile to the C:\Ruby193\lib folder which contains the tcltk directory
and then run ocra there as follows…

ocra yourfile.rb tcltk --no-autoload

… then you can copy the resulting .exe file to wherever you want
afterwards and it runs fine.

-----Messaggio originale-----
Da: Manju M. [mailto:[email protected]]
Inviato: venerd 11 novembre 2011 12:55
A: ruby-talk ML
Oggetto: To convert a Ruby tk script to *.exe

Hi,

I am building a gui for ruby using Tk. I built one and I would like to
convert that into *.exe file. Can anyone suggest me how can I do that?
I tried using Ocra, but I was not successful


Posted via http://www.ruby-forum.com/.


Caselle da 1GB, trasmetti allegati fino a 3GB e in piu’ IMAP, POP3 e
SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

Sponsor:
Conto Arancio al 4,20%. Zero spese e massima liberta’, aprilo in due
minuti!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid922&d)-12

Jon C. wrote in post #1039744:

Maybe too late but the thing to do is to copy the ruby file you wish to
compile to the C:\Ruby193\lib folder which contains the tcltk directory
and then run ocra there as follows…

ocra yourfile.rb tcltk --no-autoload

… then you can copy the resulting .exe file to wherever you want
afterwards and it runs fine.

For future reference as well, if you want to let Ocra pick up gems which
it doesn’t acquire properly from their “require” statements, you can
check for the “Ocra” constant and deviate. For example:

require ‘watir-webdriver’

if defined?(Ocra)
puts “I’m building an exe!”; b = Watir::Browser.new; b.quit; exit
end

puts “I’m not using Ocra this time.”