No Such File To Load Passenger and Sinatra

passenger, sinatra

Solution

I had the same problem here:

# config.ru

require 'rubygems'
require 'sinatra'

require File.dirname(__FILE__) + "/app.rb"

run Sinatra::Application

Problem

I've recently updated to Ruby 1.9.2 (RVM), Sinatra 1.1 and Passenger 3.0.0. I have a simple application composed of: ``` # config.ru require 'rubygems' require 'sinatra' require 'app.rb' run Sinatra::Application # app.rb require 'rubygems' require 'sinatra' get '/' do erb :index end ``` If I run the application from the terminal using `ruby app.rb` everythign launches as expected. However, with Passenger I get: `no such file to load -- app.rb`. I have other Rails applications running fine with the setup, and have setup the document root to a sub public directory. Any ideas how to fix this? Thanks!

Original source