Search code examples
rubyshoes

Is there a way to run directly a ruby shoes app?


I managed to build shoes on Linux (Mint 14), but apparently I can only run my script by first running the shoes executable and selecting "Open an App". That's a bit tedious, but when I run ruby CoverMaker.rb, I get the following errors:

/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>'

My full code below:

require 'shoes'
#include Shoes

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

Uncommenting the #include 'shoes' gets an error "Wrong argument type Class (expected Module)"
So, is there a way to get the script working by directly running it without the overhead of running shoes first?


Solution

  • If you built shoes as the standalone application you should be able to run your script with the following command:

    ./shoes CoverMaker.rb