0

I am running a fresh install of Windows, Ruby 1.9.3p327, and and Ocra 1.3.0.

test.rb:

puts 'hi'

ocra test.rb returns:

=== Loading script to check dependencies
hi
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:467: Use
RbConfig instead of obsolete and deprecated Config.
=== Including 52 encoding support files (2831360 bytes, use --no-enc to
exclude)

=== Building test.exe

=== Adding user-supplied source files

=== Adding ruby executable ruby.exe

=== Adding detected DLL C:/Ruby193/bin/libyaml-0-2.dll

=== Adding detected DLL C:/Ruby193/bin/zlib1.dll

=== Adding detected DLL C:/Ruby193/bin/libffi-6.dll

=== Adding library files

=== Compressing 6529206 bytes

C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:1003:in block in initialize': unhandled exception

from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:983:in open'

from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:983:in initialize'

from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:822:in new'

from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:822:in build_exe'

from
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:1138:in block in <top (required)>'

The offending line in ocra is:

system("\"#{Ocra.lzmapath}\" e tmpin tmpout 2>NUL") or fail
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Virtuoso
  • 908
  • 1
  • 8
  • 14
  • check for write permission and turn off your antivirus and let us know if there's still a problem. – pguardiario Dec 01 '12 at 12:42
  • I see that OCRA fails to build. Well, good luck. – sawa Dec 01 '12 at 13:31
  • I've checked the following: No spaces or odd characters in the build path or filename, no antivirus or other security program interfering, cmd running with full admin rights in a folder with full ownership. This works on all the PCs I've used, but this is the first time I've run Ocra on a laptop... – Virtuoso Dec 01 '12 at 20:09
  • If it works on multiple other machines and fails on the laptop, the problem is the laptop configuration, not the code. And, as such, is very likely off-topic for Stack Overflow. – the Tin Man Dec 01 '12 at 20:20

1 Answers1

0

Solved, this was an unanticipated side-effect to the Autorun registry key which allows you to redirect your command-prompt's default directory. For some reason it only had an adverse effect on this one machine.

Virtuoso
  • 908
  • 1
  • 8
  • 14