SCENARIUSZOCRA wyrzuca błędy przy pakowaniu skrypt
Mam zainstalowany pakiet Ruby 2.1.5 (x64) następnie zainstalowałem Ocra gem pomyślnie:
gem install ocra
Fetching: ocra-1.3.3.gem (100%)
Successfully installed ocra-1.3.3
Parsing documentation for ocra-1.3.3
Installing ri documentation for ocra-1.3.3
Done installing documentation for ocra after 0 seconds
1 gem installed
PROBLEM
Próbuję spakować testowy Scr IPT:
# -*- coding: UTF-8 -*-
# require ''
exit if Object.const_defined?(:Ocra)
print "Hello World!"
sleep 3
__END__
Ale gdy próbuję użyć OCRA, rzuca błędy:
ocra "TestScript.rb"
=== Loading script to check dependencies
=== Detected gem ocra-1.3.3 (loaded, files)
=== 6 files, 190931 bytes
=== Detected gem io-console-0.4.2 (loaded, files)
C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:86:in `open':
No such file or directory @ dir_initialize - C:/Program Files/Ruby/lib/ruby/gem
s/2.1.0/gems/io-console-0.4.2 (Errno::ENOENT)
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
86:in `entries'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
86:in `entries'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
92:in `find_all_files'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
665:in `block (2 levels) in find_gem_files'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
658:in `each'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
658:in `block in find_gem_files'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
611:in `each'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
611:in `find_gem_files'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
728:in `build_exe'
from C:/Program Files/Ruby/lib/ruby/gems/2.1.0/gems/ocra-1.3.3/bin/ocra:
1165:in `block in <top (required)>'
PYTANIE
Dlaczego to się dzieje? Jak to naprawić?
Dzięki, ale nie mam doświadczenia z Ruby, nie rozumiałem, jak rozwiązać problem, powinienem umieścić to polecenie w konsoli ruby? – ElektroStudios
Jestem pod Windows – ElektroStudios