Skip to content
Browse files

remove app root from LOAD_PATH

  • Loading branch information...
1 parent 6b2b275 commit 1ff1f4692416e064d8d19a409f95c9fd5a7bf875 @mislav committed May 2, 2012
Showing with 4 additions and 5 deletions.
  1. +2 −2 app.rb
  2. +2 −3 config.ru
View
4 app.rb
@@ -1,7 +1,7 @@
# encoding: utf-8
require 'sinatra'
require 'never_forget'
-require 'instagram'
+require_relative 'instagram'
require 'active_support/core_ext/object/blank'
require 'active_support/notifications'
require 'active_support/cache'
@@ -16,7 +16,7 @@
require 'haml'
require 'sass'
require 'compass'
-require 'models'
+require_relative 'models'
require 'choices'
Choices.load_settings(File.join(settings.root, 'config.yml'), settings.environment.to_s).each do |key, value|
View
5 config.ru
@@ -2,10 +2,9 @@ require 'rubygems'
require 'bundler'
Bundler.setup
-$LOAD_PATH.unshift ENV['APP_ROOT'] || File.expand_path('..', __FILE__)
-# $LOAD_PATH.unshift File.join($LOAD_PATH.first, 'lib')
+app_root = ENV['APP_ROOT'] || File.expand_path('..', __FILE__)
Encoding.default_external = 'utf-8'
-require 'app'
+require File.join(app_root, 'app')
run Sinatra::Application

0 comments on commit 1ff1f46

Please sign in to comment.
Something went wrong with that request. Please try again.