diff options
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r-- | railties/lib/rails/tasks/documentation.rake | 2 | ||||
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index db1939c45f..65d0d476ba 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -55,7 +55,7 @@ namespace :doc do desc "Generate Rails guides" task :guides do require File.join(RAILTIES_PATH, "guides/rails_guides") - RailsGuides::Generator.new(File.join(RAILS_ROOT, "doc/guides")).generate + RailsGuides::Generator.new(Rails.root.join("doc/guides")).generate end namespace :plugins do diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index f7b53885c8..5d7c094d8b 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -85,15 +85,16 @@ namespace :rails do template = ENV["LOCATION"] template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} - require 'generators' - generator = Rails::Generators::App.new [ Rails.root ], {}, :destination_root => Rails.root + require 'rails/generators' + require 'generators/rails/app/app_generator' + generator = Rails::Generators::AppGenerator.new [ Rails.root ], {}, :destination_root => Rails.root generator.apply template, :verbose => false end namespace :update do def invoke_from_app_generator(method) require 'rails/generators' - require 'rails/generators/rails/app/app_generator' + require 'generators/rails/app/app_generator' generator = Rails::Generators::AppGenerator.new ["rails"], { :with_dispatchers => true }, :destination_root => Rails.root |