Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix boot order for bundler

  • Loading branch information...
commit 1708305422738a074ec6c57f21ffb713496cd46b 1 parent 2fb62b3
David Dollar ddollar authored
Showing with 19 additions and 18 deletions.
  1. +19 −0 config/boot.rb
  2. +0 −18 config/preinitializer.rb
19 config/boot.rb
View
@@ -109,5 +109,24 @@ def read_environment_rb
end
end
+# for bundler
+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
+
# All that for this:
Rails.boot!
18 config/preinitializer.rb
View
@@ -1,19 +1 @@
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
Please sign in to comment.
Something went wrong with that request. Please try again.