title: Sinatra: Undefined method 'run' when using bundle exec ruby app.rb
body: <p>I have modular style sinatra app, with the following line near the end, so that it can be run standalone:</p>
  
  <pre><code>  # ... all code before this omitted
    run! if __FILE__ == $0
  
  end
  # This is the end of the file
  </code></pre>
  
  <p>When I run this app with <code>ruby app.rb</code> it works fine, and webrick starts up.</p>
  
  <p>However, if I run it instead with <code>bundle exec ruby app.rb</code> I get this error:</p>
  
  <pre><code>&gt;bundle exec ruby app.rb
  C:/Ruby200/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1488:in `start_server': undefined method `run' for HTTP:Module (NoMethodError)
          from C:/Ruby200/lib/ruby/gems/2.0.0/gems/sinatra-1.4.4/lib/sinatra/base.rb:1426:in `run!'
  </code></pre>
  
  <p>What's causing this error?</p>