Ho installato il pacchetto Ruby 2.1.5 (x64) poi ho installato il Ocra gemma con successo:
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
PROBLEMA
Sto provando a fare un esame di prova IPT:
# -*- coding: UTF-8 -*-
# require ''
exit if Object.const_defined?(:Ocra)
print "Hello World!"
sleep 3
__END__
Ma quando provo ad usare Ocra, esso genera errori:
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)>'
DOMANDA
Perché accade questo? Come sistemarlo?
Grazie ma non ho esperienza con Ruby, non ho capito come risolvere il problema, dovrei mettere questo comando nella console ruby? – ElektroStudios
Sono sotto Windows – ElektroStudios