Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

Add error message for including nokogiri in Gemfile for rake doc:guides
  • Loading branch information...
commit 55c9109b5a4e5018973d3f9856d0ba15123ae3a9 2 parents c199580 + 2c02fc3
@senny senny authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 guides/rails_guides.rb
View
19 guides/rails_guides.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.