3.1.0.rc4 - NoMethodError: undefined method `compress' for :scss:Symbol #1619

Closed
markbates opened this Issue Jun 10, 2011 · 4 comments

Comments

Projects
None yet
5 participants

With RC4 I'm getting the following error:

NoMethodError: undefined method `compress' for :scss:Symbol (in /app/app/assets/stylesheets/application.css.scss)

[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sprockets-2.0.0.beta.10/lib/sprockets/compressor.rb:21 'evaluate'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/tilt-1.3.2/lib/tilt/template.rb:76 'render'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sprockets-2.0.0.beta.10/lib/sprockets/context.rb:107 'block in evaluate'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sprockets-2.0.0.beta.10/lib/sprockets/context.rb:104 'each'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sprockets-2.0.0.beta.10/lib/sprockets/context.rb:104 'evaluate'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sprockets-2.0.0.beta.10/lib/sprockets/bundled_asset.rb:39 'source'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sprockets-2.0.0.beta.10/lib/sprockets/bundled_asset.rb:49 'digest'
[PROJECT_ROOT]/vendor/bundle/ruby/1.9.1/gems/sprockets-2.0.0.beta.10/lib/sprockets/server.rb:91 'path'

Reverting to RC1 fixes the problem. This seems fine in development, but in production it breaks. Here's the relevant lines from production.rb:

  config.serve_static_assets = true

  # Compress both stylesheets and JavaScripts
  config.assets.js_compressor  = :uglifier
  config.assets.css_compressor = :scss
Owner

guilleiguaran commented Jun 10, 2011

Looks like :scss isn't include in Rails anymore. In the Rails code:

rc1: https://github.com/rails/rails/blob/v3.1.0.rc1/actionpack/lib/sprockets/railtie.rb#L81

rc4: https://github.com/rails/rails/blob/v3.1.0.rc4/actionpack/lib/sprockets/railtie.rb#L83

The commit that remove it was: e1043cc#actionpack/lib/sprockets/railtie.rb

The compressor is now in Sass-Rails (https://github.com/rails/sass-rails/blob/master/lib/sass/rails/compressor.rb), and we must wait until Sass-Rails release to integrate it (related: #1432)

Owner

guilleiguaran commented Jun 10, 2011

Take a look to #1626

Contributor

chriseppstein commented Jun 10, 2011

Sass-rails automatically sets up the sass compressor. Just remove the line of code that breaks.

This issue can be closed.

Contributor

nragaz commented Jun 11, 2011

I agree with this resolution, but given that the default config from previous RCs now breaks, I think an explanation in the changelog would be warranted.

@spastorino spastorino closed this Jul 11, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment