title: How do I get my ruby source in the load path when invoking with thin?
body: <p>I'm playing around with a combination of Thin, Sinatra and Bundler. I'm trying to understand how I get Thin to include the path to my source code in the load path? I have looked for introductory tutorials to this setup, but none of them seem to answer my question.</p>
  
  <p>Mucking around with the rackup file or Thin config file feels wrong. Assume I have a directory structure with something like:</p>
  
  <pre><code>bin/my-application-entry.rb # The entry point to my sinatra application
  lib/myapp/mylibs.rb
  thin/config.ru # rackup config
  thin/dev.yaml  # thin config
  Gemfile        # for my dependencies
  </code></pre>
  
  <p>The contents of the rackup file is essentially</p>
  
  <pre><code>require 'sinatra'
  # I'd like to require 'my-application-entry' around here somewhere (I think?)
  run Sinatra.application
  </code></pre>
  
  <p>I invoke the application with</p>
  
  <pre><code>thin -C thin/dev.yaml -R thin/config.ru start
  </code></pre>
  
  <p>I noticed that thin takes a command-line argument to require a specific library, but surely there is a better place where you can define all the load paths?</p>
  
  <p>So my question is really, how do I tell thin/rack/bundler which directories to include? (such as bin/ and lib/)</p>
  
  <p>Edit: For clarity, I'd really like to know how this is generally done with Thin specifically. I am reluctant to modify $: in my main application, but if I am forced to use $:, where is the best place (in a Thin/Rack/Sinatra context) to do so?</p>