Fall back to normal loading if the haml-edge gem isn't found.

This commit is contained in:
Chris Eppstein 2009-05-07 10:24:32 -07:00
parent 84f657027a
commit 70086c880b
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
require 'rubygems'
gem 'haml-edge','>= 2.1'
require 'sass'
unless defined?(Sass)
require 'rubygems'
begin
gem 'haml-edge','>= 2.1'
rescue Exception
$stderr.puts "WARNING: haml-edge gem not found. Trying to find haml on the load path."
end
require 'sass'
end

View File

@ -17,6 +17,7 @@ linked_haml = File.dirname(__FILE__) + '/haml'
if File.exists?(linked_haml) && !$:.include?(linked_haml + '/lib')
puts "[ using linked Haml ]"
$:.unshift linked_haml + '/lib'
require 'sass'
else
need_gems = true
end