diff --git a/CHANGELOG b/CHANGELOG index 1bc5bfd1c..327d3974e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ === Edge +* Warn about using the RedCloth 3 fallback. [Sean Cribbs, Jason Garber] * Prevent stty errors on JRuby while running bootstrap. [Sean Cribbs] * Moved template_name to ApplicationController [Jim Gay, Michael Kessler] * Remove vizres plugin. [Sean Cribbs] diff --git a/lib/radiant/initializer.rb b/lib/radiant/initializer.rb index 5d7388668..aa3178d5f 100644 --- a/lib/radiant/initializer.rb +++ b/lib/radiant/initializer.rb @@ -51,10 +51,15 @@ def library_directories #{RADIANT_ROOT}/vendor/rack-cache/lib } begin + Object.send :gem, 'RedCloth', ">=4.0.0" require 'redcloth' - rescue LoadError + rescue LoadError, Gem::LoadError # If the gem is not available, use the packaged version libs << "#{RADIANT_ROOT}/vendor/redcloth/lib" + after_initialize do + warn "RedCloth > 4.0 not found. Falling back to RedCloth 3.0.4 (2005-09-15). You should run `gem install RedCloth`." + require 'redcloth' + end end libs end