title: slim tries to render template from wrong path
body: <p>I'm new to the ruby world, and Sinatra for that matter, so I have no choice but to ask here about the error I keep getting.</p>
  
  <p>I'm using a combination of Rack + Sinatra with Slim as template engine. I have my <code>app.rb</code> setup as this:</p>
  
  <pre><code>module Pulsr
  
  class StylusHandler &lt; Sinatra::Base
    set :views, File.dirname(__FILE__) + '/stylus'
  
    get '/css/styles.css' do
      stylus :styles
    end
  end
  
  class Application &lt; Sinatra::Base
  
    register Sinatra::ConfigFile
  
    config_file './config/config.yml'
  
    use Pulsr::Api
    use Pulsr::Routes
  
    enable :logging, :dump_errors if Sinatra::Base.development?
    disable :method_override, :run
  
    set :public_folder, File.join(:root.to_s, 'static')
    set :views, File.join(:root.to_s, 'views')
    #set :static_cache_control, [:public, max_age: 60 * 60 * 24 * 365] if Sinatra::Base.production?
  
  end
  </code></pre>
  
  <p>end</p>
  
  <p>And the <code>Pulsr::Api</code> and <code>Pulsr::Routes</code> are in two different files in a subdirectory. The issue I have is that slim tries to render the template relative to the path of the routes file, which looks like this:</p>
  
  <pre><code>module Pulsr
  class Routes &lt; Sinatra::Base
    get '/*' do
      slim :index
    end
  end
  </code></pre>
  
  <p>end</p>
  
  <p>So, my folder structure looks something like this:</p>
  
  <pre><code>- config
    - config.yml
    ...
  - controllers
    - routes.rb
  - views
    - index.slim
  - app.rb
  - config.ru
  - Gemfile
  ...
  </code></pre>
  
  <p>I get this error: <code>No such file or directory @ rb_sysopen - /Users/rolandjitsu/Projects/Products/pulsr/controllers/views/index.slim</code> where the template is actually placed with one level up in the <code>views</code> folder.</p>
  
  <p>Before I had all the code in the <code>app.rb</code> file, and , normally, it worked, but now I am unsure how to fix this path issue.</p>