尝试使用ocra将ruby脚本编译为Windows可执行文件。由于某些原因,因为将business_time添加到脚本,它拒绝编译。如果我删除require'business_time',它将编译。所以我为business_time创建了一个脚本,它可以工作但不会编译。努力从ERROR消息中查看问题所在。
提前致谢。
require 'rubygems'
require 'business_time'
puts 1.business_day.ago.strftime("%Y%m%d")
puts 1.business_day.ago.strftime("%m/%d/%Y")
C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:467:使用 RbConfig代替o f过时和弃用的配置。 C:/Ruby/lib/ruby/gems/1.9.1/gems/i18n-0.6.1/lib/i18n/tests/basics.rb:8:在
test' : unknown command 'a' (ArgumentError) from C:/Ruby/lib/ruby/gems/1.9.1/gems/i18n-0.6.1/lib/i18n/tests/basics.r b:8:in
” 来自C:/Ruby/lib/ruby/gems/1.9.1/gems/i18n-0.6.1/lib/i18n/tests/basics.r b:3:<module:Tests>' from C:/Ruby/lib/ruby/gems/1.9.1/gems/i18n-0.6.1/lib/i18n/tests/basics.r b:2:in
' 来自C:/Ruby/lib/ruby/gems/1.9.1/gems/i18n-0.6.1/lib/i18n/tests/basics.r b:1:在<top (required)>' from C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:467:in
const_中 得到' 来自C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:467:inblock (3 levels) in attempt_load_autoload' from C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:464:in
each' 来自C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:464:inblock (2 levels) in attempt_load_autoload' from C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:462:in
each' 来自C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:462:inblock in attempt_load_autoload' from C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:456:in
loop' 来自C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:456:在attemp t_load_autoload' from C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:679:in
build_中 可执行程序' 来自C:/Ruby/lib/ruby/gems/1.9.1/gems/ocra-1.3.0/bin/ocra:1138:在`block中 在'C:\Ruby>