mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make rake doc:guides
works again. Fix #10384.
This commit is contained in:
parent
a834b57b6e
commit
5aec73daf5
2 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ end
|
|||
|
||||
begin
|
||||
require 'redcarpet'
|
||||
rescue Gem::LoadError
|
||||
rescue LoadError
|
||||
# This can happen if doc:guides is executed in an application.
|
||||
$stderr.puts('Generating guides requires Redcarpet 2.1.1+.')
|
||||
$stderr.puts(<<ERROR) if bundler?
|
||||
|
|
|
@ -57,8 +57,8 @@ namespace :doc do
|
|||
|
||||
# desc "Generate Rails Guides"
|
||||
task :guides do
|
||||
# FIXME: Reaching outside lib directory is a bad idea
|
||||
require File.expand_path('../../../../../guides/rails_guides', __FILE__)
|
||||
rails_gem_dir = Gem::Specification.find_by_name("rails").gem_dir
|
||||
require File.expand_path(File.join(rails_gem_dir, "/guides/rails_guides"))
|
||||
RailsGuides::Generator.new(Rails.root.join("doc/guides")).generate
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue