diff options
Diffstat (limited to 'railties/lib/rails')
-rwxr-xr-x | railties/lib/rails/generators/rails/plugin_new/templates/Rakefile | 7 | ||||
-rw-r--r-- | railties/lib/rails/tasks/documentation.rake | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile index 1bf9c8c831..0e4c712acb 100755 --- a/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile +++ b/railties/lib/rails/generators/rails/plugin_new/templates/Rakefile @@ -4,8 +4,11 @@ begin rescue LoadError puts 'You must `gem install bundler` and `bundle install` to run rake tasks' end - -require 'rdoc/task' +begin + require 'rdoc/task' +rescue LoadError + require 'rake/rdoctask' +end RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' diff --git a/railties/lib/rails/tasks/documentation.rake b/railties/lib/rails/tasks/documentation.rake index c8b4040151..59305322b7 100644 --- a/railties/lib/rails/tasks/documentation.rake +++ b/railties/lib/rails/tasks/documentation.rake @@ -1,4 +1,8 @@ -require 'rdoc/task' +begin + require 'rdoc/task' +rescue LoadError + require 'rake/rdoctask' +end # Monkey-patch to remove redoc'ing and clobber descriptions to cut down on rake -T noise class RDocTaskWithoutDescriptions < RDoc::Task |