diff options
Diffstat (limited to 'guides/rails_guides.rb')
-rw-r--r-- | guides/rails_guides.rb | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/guides/rails_guides.rb b/guides/rails_guides.rb index ce409868ca..9d1d5567f6 100644 --- a/guides/rails_guides.rb +++ b/guides/rails_guides.rb @@ -5,7 +5,7 @@ $:.unshift pwd def bundler? # Note that rake sets the cwd to the one that contains the Rakefile # being executed. - File.exists?('Gemfile') + File.exist?('Gemfile') end begin @@ -24,11 +24,30 @@ begin require 'redcarpet' rescue LoadError # This can happen if doc:guides is executed in an application. - $stderr.puts('Generating guides requires Redcarpet 2.1.1+.') + $stderr.puts('Generating guides requires Redcarpet 3.1.2+.') $stderr.puts(<<ERROR) if bundler? Please add - gem 'redcarpet', '~> 2.1.1' + gem 'redcarpet', '~> 3.1.2' + +to the Gemfile, run + + bundle install + +and try again. +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 |