lib/pugin.rb in pugin-0.6.0 vs lib/pugin.rb in pugin-0.6.1
- old
+ new
@@ -12,9 +12,16 @@
elsif sinatra?
add_i18n_paths
elsif sprockets?
register_sprockets
end
+
+ # Try and load HAML, raising an error if we are not able to
+ begin
+ require 'haml'
+ rescue LoadError => e
+ raise(LoadError, "pugin requires the 'haml' gem. Please check it is in your Gemfile - #{e.message}")
+ end
end
# Paths
def gem_path
@gem_path ||= File.expand_path '..', File.dirname(__FILE__)