[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ocra: "Failed to create directory"

TPReal

5/26/2009 7:35:00 PM

Hello.

I was trying to use Ocra with Ruby 1.9.1 on Windows. It creates the
executable but then when I try to run it, all I get is "Failed to create
directory" on the console, and the program finishes. It's hard to find
any info about this error, so I'm asking if any of you happened to
encounter and solve this problem, and could share their solution?

Thanks
TPR.
--
Posted via http://www.ruby-....

5 Answers

imphasing

5/26/2009 7:55:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

I ran across this blog post that details some of common errors with Ocra,
which mentions the error that you stated:

http://rubyonwindows.blogspot.com/2009/05/ocra-compiler-tips-tricks-and-go...

Hope that is of some help.


Alex

On Tue, May 26, 2009 at 3:35 PM, Thomas B. <tpreal@gmail.com> wrote:
>
> Hello.
>
> I was trying to use Ocra with Ruby 1.9.1 on Windows. It creates the
> executable but then when I try to run it, all I get is "Failed to create
> directory" on the console, and the program finishes. It's hard to find
> any info about this error, so I'm asking if any of you happened to
> encounter and solve this problem, and could share their solution?
>
> Thanks
> TPR.
> --
> Posted via http://www.ruby-....
>

TPReal

5/26/2009 8:10:00 PM

0

Alex wrote:
> http://rubyonwindows.blogspot.com/2009/05/ocra-compiler-tips-tricks-and-go...

Thanks, but unfortunately this does not help. Also I tried both the gem
version and the standalone version of Ocra, with the same error.
--
Posted via http://www.ruby-....

Luis Lavena

5/27/2009 12:16:00 AM

0

On May 26, 5:10 pm, "Thomas B." <tpr...@gmail.com> wrote:
> Alex wrote:
> >http://rubyonwindows.blogspot.com/2009/05/ocra-compiler-tip......
>
> Thanks, but unfortunately this does not help. Also I tried both the gem
> version and the standalone version of Ocra, with the same error.

Can you provide more information about the version of Ruby, RubyGems
and application/script you're trying to package?

is more easy to find the issues if you provide more information about
your environment. "Doesn't work" don't say too much.

ruby -v

gem env

Windows OS version?

If you can reproduce a simple "hello world" with the same problem,
will be great.

--
Luis Lavena

TPReal

5/27/2009 8:44:00 AM

0

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 `<mai
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.

Another question: is it possible with Ocra to include some static
content in the package? I cannot find any info about that.
--
Posted via http://www.ruby-....

Luis Lavena

5/27/2009 11:39:00 AM

0

On May 27, 5:43 am, "Thomas B." <tpr...@gmail.com> 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 `<mai
> 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-...
http://blog.mmediasys.com/2009/05/17/rubyinstaller-updated-packages-and-o...
http://blog.mmediasys.com/2009/05/19/pure-ruby-readline-rel...

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

Please check the mingw32 version and issues with it, and I'll really
love to help you out.

--
Luis Lavena