aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/tasks/documentation.rake4
1 files changed, 3 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake
index 1f4067d29e..b36adb2961 100644
--- a/railties/lib/rails/tasks/documentation.rake
+++ b/railties/lib/rails/tasks/documentation.rake
@@ -11,9 +11,11 @@ namespace :doc do
rdoc.rdoc_files.include('lib/**/*.rb')
}
- desc 'Generate documentation for the Rails framework. Specify path with PATH="/path/to/rails"'
+ desc 'Generate documentation for the Rails framework. Specify path with RAILS_PATH="/path/to/rails"'
Rake::RDocTask.new("rails") { |rdoc|
path = ENV['RAILS_PATH'] || 'vendor/gems/gems'
+ raise "Missing Rails directory at #{path}" unless File.directory?(path)
+
version = "-#{Rails::VERSION::STRING}" unless ENV['RAILS_PATH']
rdoc.rdoc_dir = 'doc/api'
rdoc.template = "#{ENV['template']}.rb" if ENV['template']