Upgrading to Rails 2.3.4 and Haml 2.2.24

master
Alinson S. Xavier 12 years ago
parent bbba5d7df9
commit 5fa732cd0b

@ -75,7 +75,6 @@ Rails::Initializer.run do |config|
config.gem "dr_nic_magic_models" config.gem "dr_nic_magic_models"
config.gem "bluecloth" config.gem "bluecloth"
config.gem "acts_as_versioned"
config.gem "haml" config.gem "haml"
config.gem "hpricot" config.gem "hpricot"
config.gem "icalendar" config.gem "icalendar"

@ -1,8 +1,18 @@
begin begin
require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
rescue LoadError rescue LoadError
begin
require 'haml' # From gem 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') ||
Rake.application.top_level_tasks.include?('gems:install'))
end
end end
# Load Haml and Sass # Load Haml and Sass.
Haml.init_rails(binding) # Haml may be undefined if we're running gems:install.
Haml.init_rails(binding) if defined?(Haml)