diff --git a/config.ru b/config.ru index 261d1e71c..d29422417 100644 --- a/config.ru +++ b/config.ru @@ -1,9 +1,17 @@ -require './kibana' -require 'rubygems' -require 'sinatra' +root_dir = File.dirname(__FILE__) +app_file = File.join(root_dir, 'kibana.rb') + +require app_file + +begin + require 'sinatra' +rescue LoadError + require 'rubygems' + require 'sinatra' +end set :environment, ENV['RACK_ENV'].to_sym -set :app_file, 'kibana.rb' +set :app_file, app_file disable :run run Sinatra::Application