1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

Add error message for including nokogiri in Gemfile for rake doc:guides
This commit is contained in:
Yves Senn 2013-08-26 03:20:48 -07:00
commit 55c9109b5a

View file

@ -39,6 +39,25 @@ ERROR
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