Passenger Desk application cannot call the base path "

I have a simple config.ru file for my Sinatra application.

 require 'sinatra' require 'app' run Sinatra::Application 

However, Passenger does not work with the error no such file to load -- app . I tried to use the 1.9 require_relative method 1.9 but now causes a cannot infer basepath .

I am currently using a very hacky require File.join(File.dirname(__FILE__), 'app' ) , which is just awful and I don't want to do this every time I want the file to be.

Is there a reason Ruby is not working as usual?

+7
ruby passenger rack sinatra
source share
1 answer

In ruby ​​1.9.2, the current directory is no longer in LOAD_PATH.

So if your LOAD_PATH and add current_directory if not done.

+1
source share

All Articles