作者wemee (我不为读者改变作风)
看板Ruby
标题Re: [问题] 怎麽把ruby 包成一个执行档??
时间Mon Dec 22 00:11:38 2008
※ 引述《neoesque (Anti M$)》之铭言:
: 首先请先安装 gem 依照你的distro不同有不同的安装方式
: debian 系列请用 apt-get
: gentoo 请用 emerge
: MacOSX/FreeBSD 就用 port 装就好了
: 装好後请下 gem install tar2rubyscript
: 跟 gem install rubyscript2exe
: 就会安装上述两只程式
: 然後你写的程式 请命名为 init.rb 假设放在 test 的资料夹里
: 然後退回到 init.rb 的上一层 (就是跟 test 同一层)
: 先下 tar2rubyscript test
: 他就会造一个 test.rb 出来 (在 test 同一层下)
: 然後再打 rubyscript2exe test.rb 就会生出 test_xxx (这里好像会因平台而异
: 我用 Mac OS X 会生出 test_darwin )
: 最後生出来的 test_xxxx 就是执行档了 ;)
请问 我按照上面的流程 产生了执行档
执行的结果 显示:
"C:\DOCUME~1\wemee\eee\eee.hello.exe.2\app\hello.rb doesn't contain an init.rb .
请问是哪里出了错了
以下是我的步骤
1.建立名称为"hello"的资料夹
2.在"hello"资料夹里面新增一个纯文字文件
3.在纯文字文件里头 输入:puts "hello"
4.将纯文字文件档名改成init.rb
5.打开console模式 进入hello资料夹的上一层
6.输入指令 tar2rubyscript hello 产生 hello.rb档案
7.输入指令 rubyscript2exe hello 产生 hello.exe档案
8.输入指令 hello 执行程式
9.出现错误讯息
C:\DOCUME~1\wemee\eee\eee.hello.exe.2\app\hello.rb doesn't contain an init.rb
郑中基:是哪里出了错 我听见你在闪躲 你不要只是摇摇头
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.130.36.41
1F:推 godfat:这好像没在维护了... 12/22 21:07
2F:→ poga:try exerb? 12/23 00:52