Skip to content

Commit

Permalink
using bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
hone committed Jan 13, 2010
1 parent a178eab commit 250fcbe
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Gemfile
@@ -0,0 +1,4 @@
disable_system_gems
bundle_path "vendor/bundler_gems"

gem 'rails', '2.3.5'
11 changes: 11 additions & 0 deletions config/boot.rb
Expand Up @@ -36,8 +36,19 @@ def preinitializer_path
class 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

class VendorBoot < Boot
Expand Down
1 change: 1 addition & 0 deletions config/preinitializer.rb
@@ -0,0 +1 @@
require "#{File.dirname(__FILE__)}/../vendor/bundler_gems/environment"

0 comments on commit 250fcbe

Please sign in to comment.