diff --git a/lib/bootstrap-sass.rb b/lib/bootstrap-sass.rb index 94846e4a9c..d07555a421 100644 --- a/lib/bootstrap-sass.rb +++ b/lib/bootstrap-sass.rb @@ -15,12 +15,17 @@ def self.load! register_rails_engine end - if !(rails? || compass?) - raise Bootstrap::FrameworkNotFound, "bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded" + unless rails? || compass? + raise Bootstrap::FrameworkNotFound, + 'bootstrap-sass requires either Rails > 3.1 or Compass, neither of which are loaded' + end + + bs_stylesheets = File.expand_path(File.join('..', 'vendor', 'assets', 'stylesheets')) + ::Sass.load_paths << bs_stylesheets + if ::Sass::Script::Number.precision < 10 + # see https://github.com/thomas-mcdonald/bootstrap-sass/issues/409 + ::Sass::Script::Number.precision = 10 end - - stylesheets = File.expand_path(File.join("..", 'vendor', 'assets', 'stylesheets')) - ::Sass.load_paths << stylesheets end private