提交 55c9109b 编写于 作者: Y Yves Senn

Merge pull request #11973 from prathamesh-sonpatki/nokogiri-warning

Add error message for including nokogiri in Gemfile for rake doc:guides
......@@ -39,6 +39,25 @@ def bundler?
exit 1
end
begin
require 'nokogiri'
rescue LoadError
# This can happen if doc:guides is executed in an application.
$stderr.puts('Generating guides requires Nokogiri.')
$stderr.puts(<<ERROR) if bundler?
Please add
gem 'nokogiri'
to the Gemfile, run
bundle install
and try again.
ERROR
exit 1
end
require 'rails_guides/markdown'
require "rails_guides/generator"
RailsGuides::Generator.new.generate
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册