From: Joel Pearson Date: 2012-07-26T08:04:34+09:00 Subject: Re: To convert a Ruby tk script to *.exe 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/.