uninitialized constant Sprockets::SassCacheStore
Closed this issue · 5 comments
I've had sprockets locked by compass-rails
for as long as I've been using Compass, which is almost a couple of years. I am done with this and ready to tear out Compass unless I can use it without stale dependencies (or dependencies that are out of date for at most a couple months, rather than years). So here is my last cry for help. I have had my gems locked at gem "compass", "1.0.3"
, gem "compass-rails", "2.0.4"
, and gem "sass-rails", "5.0.1"
, which locked my sprockets at sprockets (2.12.4)
With this in my Gemfile:
gem "compass"
gem "compass-rails"
gem "sass-rails"
And after generating a new Gemfile.lock running bundle install
:
compass (1.0.3)
compass-rails (2.0.1)
sass-rails (5.0.4)
sprockets (3.4.0)
And restarting my server, I get an uninitialized constant Sprockets::SassCacheStore
error when loading my site.
Looks to me like this repo is basically abandoned as far getting things running with Sprockets greater than 2. I saw something about having merged a fix for 3, but doesn't seem to be working for me. If someone has a fix or is assigned to work on this, I might wait to remove compass, otherwise I am done.
Thanks in advance.
Instead of gem 'compass-rails'
use the following line in your Gemfile
:
gem 'compass-rails', github: 'compass/compass-rails', branch: 'master'
But be sure to run bundle update
afterwards.
Thanks for the advice. I tried that but it throws this error:
undefined method =~' for #<Pathname:../images/user_interface/add_new.png>
This is the name of one of the images in my Compass sprites (I haven't torn those out of my app yet). In some of the issues discussions it seems like there are no plans for patching Compass sprites, correct? Hope I can pay down my technical debt to Compass Rails someday. Seems like a big risk to leave it in my gem set at all, particularly since you can just copy the SCSS Compass uses into your app without depending on this gem and its many stale dependencies. I am half done the teardown, I found it easy to replace the removed mixins with my own SCSS using Compass docs, and what is left is replacing the sprites with a stable alternative. Rolling back again....
Ripped Compass out completely, reverse engineered all the mixins from the docs. Debt fully paid off.
Having this same problem with rails 4.2.4, sass-rails 5.0.4, and compass-rails 2.0.1. Please re-open.
@ajsharp - the maintainers who got this gem working with Sprockets 3 made some comments about not bothering to fix the sprites implementation, so I just switched to SpriteFactory. It was more than a year that this kept my sprockets locked back, so I would want to see this gem well maintained for awhile before I put it back into my set.