2

I have a new-ish rails 3.1.1 app using sass/compass with compass taking care of the sprite generations for me. In development, all works just fine. However, when I deploy, I see this entry in the log file:

Compiled team/application.css  (1ms)  (pid 24202)
Compiled team/forms.css  (0ms)  (pid 24202)
Compiled team/member.css  (0ms)  (pid 24202)
Compiled application.css  (0ms)  (pid 24202)
Completed 500 Internal Server Error in 2014ms

ActionView::Template::Error (File name too long - /home/cri/webapps-releases/cri/releases/20111121225403/app/assets/images/html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote...(the rest of my compiled css goes here)

My production config (for asset stuff) is pretty vanilla wiht much of it being what was generated by rails:

  # Disable Rails's static asset server (Apache or nginx will already do this)
  config.serve_static_assets = false

  # Compress JavaScripts and CSS
  config.assets.compress = true

  # Specify the default JavaScript compressor
  config.assets.js_compressor  = :uglifier

  # Don't fallback to assets pipeline if a precompiled asset is missed
  config.assets.compile = true

  # Generate digests for assets URLs
  config.assets.digest = true

  config.assets.debug = true

Can anybody tell me why my compiled css is being used as the filename for the sprite?

Update: Modified title to reflect what I now think I know about this issue.

I am running rails-3.1.1 with sass-3.1.10 and sass-rails-3.1.5 and compass-0.11.3.

2
  • If I set config.assets.digest = false, then the problem goes away. So, the question now becomes who should I file this bug to?
    – ynkr
    Nov 22, 2011 at 1:00
  • have you precompiled your assets? Do you know about the .css.sass extension? Dec 22, 2011 at 12:14

3 Answers 3

2

compass-0.11.3 does not have proper asset pipeline support you are going to want to be using the >= 0.12.alpha.3 release you can get this by doing gem install compass --pre if you are still having this issue under 0.12 then it is a bug and i would be grateful if you would file a ticket on the compass github.

1

Try

config.assets.debug = false
1

Those workarounds are true, but this bug in rails was fixed in 3.1.4. Upgrading is likely your best all-around bet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.