views:

52

answers:

2

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!

+2  A: 

Managed to fix the issue. Figured out for some reason the config.ru requires the include to be specified relative to the current directory. The modified file is:

# config.ru

require 'rubygems'
require 'sinatra'
require './app.rb'

run Sinatra::Application
Kevin Sylvestre
+2  A: 

Hi,

I had the same problem here,

# config.ru

require 'rubygems'
require 'sinatra'

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

run Sinatra::Application

have fun, Francisco

include