From: Luis Lavena Date: 2009-05-27T20:40:06+09:00 Subject: Re: Ocra: "Failed to create directory" On May 27, 5:43 am, "Thomas B." wrote: > Luis Lavena wrote: > > Can you provide more information about the version of Ruby, RubyGems > > and application/script you're trying to package? > > ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32] > > ocra (1.0.3) > > Windows XP SP3 > >   - RUBYGEMS VERSION: 1.3.3 >   - RUBY VERSION: 1.9.1 (2009-01-30 patchlevel 0) [i386-mswin32] >   - RUBYGEMS PLATFORMS: >     - ruby >     - x86-mswin32-60 >   - GEM CONFIGURATION: >      - :update_sources => true >      - :verbose => true >      - :benchmark => false >      - :backtrace => false >      - :bulk_threshold => 1000 > > > If you can reproduce a simple "hello world" with the same problem, > > will be great. > > A simple "hello world" program works like it should. If I require and > use any of the files from the standard library (like 'matrix', > 'rexml/document') it still works. Now if I require a gem file: for > 'syntax' (1.0.0) it works, and for 'log4r'  (1.0.5) it fails with: > > C:/DOCUME~1/TPReal/USTAWI~1/Temp/seb3B.tmp/src/_hello.rb:2:in `require': > no such >  file to load -- log4r (LoadError) >         from > C:/DOCUME~1/TPReal/USTAWI~1/Temp/seb3B.tmp/src/_hello.rb:2:in ` n>' > > I do require 'rubygems' before 'log4r' in my script. > > And to get the "Failed to create directory" error, I need to require my > custom library file, which is located in D:\Ruby\_Files, and is > accessible because "D:/Ruby/_Files" is stored in RUBYLIB environment > variable. Passing it as -I to ruby gives the same result. > > Each time I run ocra I get WARNING: Couldn't find enumerator.so. This is > because $"[0] is "enumerator.so" (no full path). I don't know why but I > feel it is not a problem here. That is really helpful information Thomas. In case you're aren't aware, I've been working on a MinGW based version of Ruby. Right now, 1.9.1-p129 for mingw32 include all the missing pieces required to actually run Ruby 1.9 on Windows. Would you mind try using it instead of mswin32 version? With the MinGW version, I never got the enumerator.so warning and no problem with RubyGems at all. Please see the following posts in my blog about download links and instructions: http://blog.mmediasys.com/2009/05/05/rubyinstaller-state-of-one-click/ http://blog.mmediasys.com/2009/05/17/rubyinstaller-updated-packages-and-other-news/ http://blog.mmediasys.com/2009/05/19/pure-ruby-readline-released-012/ > > Another question: is it possible with Ocra to include some static > content in the package? I cannot find any info about that. I think is not, It doesn't assume the current directory or the directory where the original executable is located, contrary to RubyScript2Exe which plays with LOAD_PATH. Maybe the following tips help you out: http://rubyonwindows.blogspot.com/2009/05/ocra-compiler-tips-tricks-and-gotchas.html Please check the mingw32 version and issues with it, and I'll really love to help you out. -- Luis Lavena