我设法在 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'
得到一个错误“Wrong argument type Class (expected Module)”
那么,有没有一种方法可以通过直接运行脚本来使脚本正常工作,而无需首先使用跑鞋的开销?
最佳答案
如果您将鞋子构建为独立应用程序,您应该能够使用以下命令运行脚本:
./shoes CoverMaker.rb
关于ruby - 有没有办法直接运行 ruby 鞋应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14126771/