sass-rails-source-maps
sass-rails-source-maps copied to clipboard
Seems to be broken with latest version of Sprockets
I get an error about not being able to find / load Sprockets::SassImporter after a recent bundle update
The offending piece of code is: https://github.com/vhyza/sass-rails-source-maps/blob/master/lib/sass-rails-source-maps/sass_importer.rb#L2
I get the same, did you figure out a way to solve this yet?
Ditto. Any solution?
The Sprokets gem has renamed the class
I've hacked round this for now by placing in my applicaiton.rb
require 'sprockets'
Sprockets::SassImporter = Sprockets::SassProcessor
just above the Bundler.require *Rails.groups line
Oh wait, I'm getting errors elsewhere. I get the impression this gem is out of date in respect to version 3.x of sprockets. If you look at https://github.com/sstephenson/sprockets/issues/643 you'll see version 4.x will support source maps via config.sass.sourcemaps = :file in config/environments/*.rb. I think it's a case of the sprockets-rails gem needs to catch up to support this.
Hi, I'm getting the same errors, I had to disable the gem when updating to the last Rails version. Before it wasn't working either but it wasn't giving me any errors at all.
yeah this thing is totally busted with sprockets 3.0 and up. any word on development?
I have a rather sloppy & hastily adapted fork at https://github.com/inopinatus/sass-rails-source-maps. It is of "it works for me" quality and would need tidying up before submitting a pull request.
Nonetheless there it is, if that helps any of you out until sprockets 4.x comes along.
Tested solely with: sprockets 3.2.0, sprockets-rails 2.3.2, sass-rails 5.0.3, sass 3.4.15.
Another option is https://github.com/sass/sassc-rails Faster and supports:
# config/environments/development.rb
config.sass.inline_source_maps = true
thanks @aristidesfl for the tip. This gem is abandoned for quite some time now, so it is nice there is more reliable alternative. I add the note to the README..