有没有办法直接运行红宝石鞋应用程序?

时间:2013-01-02 17:53:59

标签: ruby shoes

我设法在Linux(Mint 14)上制作鞋子,但显然我只能通过运行鞋子​​可执行文件并选择“打开应用程序”来运行我的脚本。这有点单调乏味,但当我运行ruby CoverMaker.rb时,我收到以下错误:

/home/bleuarff/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- shoes (LoadError)
from /home/bleuarff/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from CoverMaker.rb:1:in `<main>'

我的完整代码如下:

require 'shoes'
#include Shoes

Shoes.app do 
  flow do
    para "Image folder:"
    edit_line
  end
end

取消注释#include 'shoes'会收到错误“错误的参数类型类(预期的模块)”
那么,有没有办法通过直接运行它来使脚本工作而不需要先运行鞋的开销呢?

2 个答案:

答案 0 :(得分:3)

如果您将鞋子构建为独立应用程序,则应该能够使用以下命令运行脚本:

./ shoes CoverMaker.rb

答案 1 :(得分:0)

在OS X上,您可以使用:

/Applications/Shoes/Shoes.app/Contents/MacOS/shoes script.rb

相关问题