title: Possible to call executable Thor-powered script without calling thor?
body: <p>I have a thor-based Ruby script, but I want to deploy it as a gem in people's <code>bin</code> directories that people can hit without having to do <code>thor mytool</code>.</p>
  
  <p>So instead they'd just use <code>mytool</code></p>
  
  <p>Is this possible?</p>
  
  <p>I know it's possible with vanilla <code>optparse</code> but I'd rather use Thor if possible.</p>
  
  <p><strong>Update:</strong> This is the code I'm using based on the example on the Thor page, but I get the error below:</p>
  
  <pre><code>#!/usr/bin/env thor
  
  class App &lt; Thor
    map "-L" =&gt; :list
  
    desc "install APP_NAME", "install one of the available apps"
    method_options :force =&gt; :boolean, :alias =&gt; :string
    def install(name)
      user_alias = options[:alias]
      if options.force?
        # do something
      end 
      # other code
    end 
  
    desc "list [SEARCH]", "list all of the available apps, limited by SEARCH"
    def list(search="")
      # list everything
    end 
  end
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre>
  /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/lib/thor/runner.rb:34:in `method_missing': undefined method `start' for nil:NilClass (NoMethodError)
          from /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/lib/thor/task.rb:22:in `send'
          from /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/lib/thor/task.rb:22:in `run'
          from /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/lib/thor/task.rb:108:in `run'
          from /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/lib/thor/invocation.rb:118:in `invoke_task'
          from /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/lib/thor.rb:246:in `dispatch'
          from /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/lib/thor/base.rb:389:in `start'
          from /usr/lib/ruby/gems/1.8/gems/thor-0.14.0/bin/thor:6
          from /usr/bin/thor:19:in `load'
          from /usr/bin/thor:19
  </pre>