Skip to content

Commit 74c5e4e

Browse files
committed
Raise an error if the asset pipeline is not configured or is disabled. The user should not activate sass rails in these cases.
1 parent 95ec78e commit 74c5e4e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/sass/rails/railtie.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ module SassContext
2323
config.sass.logger = Sass::Rails::Logger.new
2424

2525
config.before_initialize do |app|
26+
unless app.config.assets && app.config.assets.enabled
27+
raise "The sass-rails plugin requires the asset pipeline to be enabled."
28+
end
29+
2630
require 'sass'
2731
Sprockets::Engines #force autoloading
2832
Sprockets.register_engine '.sass', Sass::Rails::SassTemplate

0 commit comments

Comments
 (0)