From 7b8f9d254a331dfae0920d6112e94b23e9c95283 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sun, 11 Oct 2009 12:32:28 -0700 Subject: Fix generators load paths --- railties/Rakefile | 3 ++- railties/lib/rails/generators.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/railties/Rakefile b/railties/Rakefile index 52175a8949..23f9603b65 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -80,7 +80,8 @@ end # Run application generator ------------------------------------------------------------- task :create_rails do - require File.join(File.dirname(__FILE__), 'lib', 'rails', 'generators') + $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" + require 'rails/generators' require 'rails/generators/rails/app/app_generator' Rails::Generators::AppGenerator.start [ File.basename(PKG_DESTINATION), "--quiet" ], :destination_root => File.expand_path(File.dirname(PKG_DESTINATION)) diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index 0419a4e36c..471eb45ee6 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -1,4 +1,4 @@ -activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" +activesupport_path = "#{File.dirname(__FILE__)}/../../../activesupport/lib" $LOAD_PATH.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' require 'active_support/core_ext/object/blank' -- cgit v1.2.3