sass / sassc-rails

Integrate SassC-Ruby with Rails!
MIT License
707 stars 103 forks source link

`sassc` bump from 2.0.1 to 2.1.0 causes asset compilation to fail in production #133

Open dhMuse opened 5 years ago

dhMuse commented 5 years ago

We recently switched successfully from sass-rails to sassc-rails 2.1.2 without incident. However, when incidentally bumping sassc from 2.0.1 to 2.1.0, our deployment to heroku failed during asset compilation, without giving any useful error messages. Specifying gem 'sassc', '< 2.1.0' in the Gemfile corrected the problem, but I'm not sure how durable or desirable a solution that is, and I don't know what changes would be needed in sassc-rails to account for the sassc release changes in question. Would someone mind taking a look, please? It would be nice not to have to specify these sorts of dependency versions explicitly on the user end. Thanks!

gamecreature commented 5 years ago

Same problem here: (Running on a FreeBSD 10 environment)

linking shared-object sassc/libsass.so
/usr/bin/ld: unrecognized option '-plugin'
/usr/bin/ld: use the --help option for usage information
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
memoht commented 4 years ago

I'd like to report the same issue. Today, I attempted to deploy to Heroku after the 6.0.1 Rails upgrade which included gem 'sass-rails', '>= 6' and now Heroku deploys are failing with messages such as:

SassC::SyntaxError: Error: Undefined variable: "$mocha".
remote:  on line 23:21 of app/assets/stylesheets/base.scss

Trying to find where the source is and it seems this is it. I have variables throughout my SCSS files and it has not been an issue until this upgrade.

memoht commented 4 years ago

Follow up. In my case I found this article useful and ended up moving a bunch of my app/assets/stylesheets out of the root folder and into subfolders then updating my @import statements in the main application.scss file. Fingers crossed.

dhMuse commented 4 years ago

In my case, we're still running Rails 5.2.3, so the problem does not have to do with Rails 6 changes to asset management. I'm happy to provide further info as might be helpful.