diff --git a/Gemfile b/Gemfile index c25f6833..8be637a1 100644 --- a/Gemfile +++ b/Gemfile @@ -5,7 +5,7 @@ gemspec gem "cucumber", "~> 0.9.2" gem "rspec", "~>2.0.0" gem "rails", "~>3.0.0.rc" -gem "compass-validator", "3.0.0" +gem "compass-validator", "3.0.1" gem "css_parser", "~> 1.0.1" gem "sass", "~>3.1" gem "haml", "~> 3.1" diff --git a/Gemfile.lock b/Gemfile.lock index 9f979828..86c2008b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,7 +7,7 @@ GIT PATH remote: . specs: - compass (0.11.1.f248c22) + compass (0.11.3.e4a22c4) chunky_png (~> 1.1) fssm (>= 0.2.7) sass (~> 3.1) @@ -51,7 +51,7 @@ GEM sys-uname builder (2.1.2) chunky_png (1.2.0) - compass-validator (3.0.0) + compass-validator (3.0.1) css_parser (1.0.1) cucumber (0.9.4) builder (~> 2.1.2) @@ -136,7 +136,7 @@ DEPENDENCIES autotest autotest-fsevent compass! - compass-validator (= 3.0.0) + compass-validator (= 3.0.1) css_parser (~> 1.0.1) cucumber (~> 0.9.2) diff-lcs (~> 1.1.2) diff --git a/lib/compass/validator.rb b/lib/compass/validator.rb index adb9b9d8..f8197a3f 100644 --- a/lib/compass/validator.rb +++ b/lib/compass/validator.rb @@ -1,9 +1,16 @@ begin require 'rubygems' require 'compass-validator' -rescue LoadError - raise Compass::MissingDependency, %Q{The Compass CSS Validator could not be loaded. Please install it: - +rescue LoadError => e + if e.message =~ /core_ext/ + raise Compass::MissingDependency, <<-ERRORMSG +The Compass CSS Validator is out of date. Please upgrade it: +sudo gem install compass-validator --version ">= 3.0.1" +ERRORMSG + else + raise Compass::MissingDependency, <<-ERRORMSG +The Compass CSS Validator could not be loaded. Please install it: sudo gem install compass-validator -} +ERRORMSG + end end