If rouge isn't there, say so.
In the previous version, it would say 'redcarpet' wasn't installed, due to the rescue LoadError block on line 93. This change will tell the user that, in fact, rouge isn't installed and that this is the cause of the error, not that redcarpet isn't installed. Fixes #2464. https://github.com/jekyll/jekyll/issues/2464
This commit is contained in:
parent
2d0ba26497
commit
6849d6a5e5
|
@ -67,8 +67,15 @@ module Jekyll
|
|||
end
|
||||
when 'rouge'
|
||||
Class.new(Redcarpet::Render::HTML) do
|
||||
require 'rouge'
|
||||
require 'rouge/plugins/redcarpet'
|
||||
begin
|
||||
require 'rouge'
|
||||
require 'rouge/plugins/redcarpet'
|
||||
rescue LoadError => e
|
||||
Jekyll.logger.error "You are missing the 'rouge' gem. Please run:"
|
||||
Jekyll.logger.error " $ [sudo] gem install rouge"
|
||||
Jekyll.logger.error "Or add 'rouge' to your Gemfile."
|
||||
raise FatalException.new("Missing dependency: rouge")
|
||||
end
|
||||
|
||||
if Rouge.version < '1.3.0'
|
||||
abort "Please install Rouge 1.3.0 or greater and try running Jekyll again."
|
||||
|
|
Loading…
Reference in New Issue