Browse files

Bundler will be nice at some point, but now it causes me pain

  • Loading branch information...
1 parent 9271e68 commit 947472b14d9583e9779866301a34581067665405 @marcus committed Mar 5, 2010
Showing with 18 additions and 8 deletions.
  1. +0 −8 Gemfile
  2. +18 −0 config/preinitializer.rb
View
8 Gemfile
@@ -1,10 +1,3 @@
-#clear_sources
-#bundle_path "vendor/bundler_gems"
-#disable_system_gems
-#
-#source "http://gemcutter.org"
-#source "http://gems.github.com"
-
gem "rails", "2.3.4"
gem "amazon-ecs"
@@ -14,4 +7,3 @@ gem "linguistics"
gem "mysql"
gem "daemons"
gem "httparty"
-#gem "will_paginate", ">=2.3.12"
View
18 config/preinitializer.rb
@@ -1 +1,19 @@
require "#{File.dirname(__FILE__)}/../vendor/bundler_gems/environment"
+
+class Rails::Boot
+ def run
+ load_initializer
+ extend_environment
+ Rails::Initializer.run(:set_load_path)
+ end
+
+ def extend_environment
+ Rails::Initializer.class_eval do
+ old_load = instance_method(:load_environment)
+ define_method(:load_environment) do
+ Bundler.require_env RAILS_ENV
+ old_load.bind(self).call
+ end
+ end
+ end
+end

0 comments on commit 947472b

Please sign in to comment.