Fall back to normal loading if the haml-edge gem isn't found.
This commit is contained in:
parent
84f657027a
commit
70086c880b
@ -1,3 +1,9 @@
|
|||||||
require 'rubygems'
|
unless defined?(Sass)
|
||||||
gem 'haml-edge','>= 2.1'
|
require 'rubygems'
|
||||||
require 'sass'
|
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
|
@ -17,6 +17,7 @@ linked_haml = File.dirname(__FILE__) + '/haml'
|
|||||||
if File.exists?(linked_haml) && !$:.include?(linked_haml + '/lib')
|
if File.exists?(linked_haml) && !$:.include?(linked_haml + '/lib')
|
||||||
puts "[ using linked Haml ]"
|
puts "[ using linked Haml ]"
|
||||||
$:.unshift linked_haml + '/lib'
|
$:.unshift linked_haml + '/lib'
|
||||||
|
require 'sass'
|
||||||
else
|
else
|
||||||
need_gems = true
|
need_gems = true
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user