Created
November 15, 2009 12:22
-
-
Save leondu/235174 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here | |
rescue LoadError | |
begin | |
require 'haml' # From gem | |
rescue LoadError => e | |
# gems:install may be run to install Haml with the skeleton plugin | |
# but not the gem itself installed. | |
# Don't die if this is the case. | |
raise e unless defined?(Rake) && Rake.application.top_level_tasks.include?('gems:install') | |
end | |
end | |
# Load Haml and Sass. | |
# Haml may be undefined if we're running gems:install. | |
Haml.init_rails(binding) if defined?(Haml) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment