首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OCRA甚至无法构建最简单的exe

OCRA甚至无法构建最简单的exe
EN

Stack Overflow用户
提问于 2012-12-01 19:34:46
回答 1查看 891关注 0票数 0

我正在运行Windows、Ruby 1.9.3p327和Ocra 1.3.0的全新安装。

test.rb:

代码语言:javascript
复制
puts 'hi'

ocra test.rb返回:

代码语言:javascript
复制
=== 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)>'

ocra中令人不快的一行是:

代码语言:javascript
复制
system("\"#{Ocra.lzmapath}\" e tmpin tmpout 2>NUL") or fail
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-12-02 07:28:57

解决了,这是一个意想不到的副作用,自动运行注册表键,它允许您重定向您的命令提示符的默认目录。由于某种原因,它只对这一台机器产生了不利影响。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13659029

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档