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

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

-- Matma Rex

···

2011/11/11 Manju M. <manjuvpm12@gmail.com>:

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.

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

···

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

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

Attachments:
http://www.ruby-forum.com/attachment/6744/scr.png

···

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

-----Messaggio originale-----

···

Da: Manju M. [mailto:manjuvpm12@gmail.com]
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

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.

···

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

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

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

-- Matma Rex

-----Messaggio originale-----

···

Da: Manju M. [mailto:manjuvpm12@gmail.com]
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:
http://www.ruby-forum.com/attachment/6744/scr.png

--
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.
* Mezza pensione, Internet gratis, animazione per bimbi. Scopri l'offerta!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid981&d)-12

Jon Cooper 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."

···

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