From: Luis Lavena Date: 2009-05-22T13:28:24+09:00 Subject: Re: Create an exe with Ruby 1.9.1 On May 20, 12:13 pm, Marc-antoine Kruzik wrote: > Lars Christensen wrote: > > On Tue, May 19, 2009 at 9:36 PM, Marc-antoine Kruzik > > wrote: > >> I would create an exe file for a program written in Ruby 1.9.1. > >> But Rubyscript2exe and Exerb are using Ruby 1.8.7 (or 1.8.6). > > > OCRA works with Ruby 1.9.http://ocra.rubyforge.org/ > > Do you know where I can have more informations about Ocra ? > I downloaded ocrasa, I put it in c:/ruby/bin (a 1.9.0 version) and I > tried to compile a script containing this line : > > puts "Hello World" > > The compilation seems to be ok (I just modified the path of my ruby dir > in rbconfig.rb "C:\LAN\..." => "C:\ruby"). > During compilation, I have had a warning because enumerable.so was not > found. > > When I launch the exe file, I have an error message : > "failed to create directory" > > I run on Vista, so I tried to launch the exe on XP (because the failed > creation maybe occurs because of Vista). But I have the same problem. > > I looked at the code in ocrasa.rb, and I saw that the scrip use > ENV["TEMP"] without any problem. > So, why the exe have a problem when it tries to create a folder ? > > Because I suppose this bug occurs when ocra tries to extract the > contents of the exe into a temporary directory. I've used both 1.8 and 1.9 with ocra gem without any kind of issue. Also, running as normal user. Maybe you're trying to create a folder form your script? Please try the gem version instead of the standalone one. -- Luis Lavena