The best way to prevent middleware installation is to uninstall it. It's
pretty important that Sass work out-of-the-box with Rails, which means
installing the middleware automatically. Adding some sort of flag to prevent
that seems a little silly when there's a built-in way to uninstall any
middleware.

On Fri, Aug 6, 2010 at 10:59 PM, Lawrence Pit <[email protected]>wrote:

>  Hi Nathan,
>
> Just wanted to let you know that I have found no consistent way of
> reproducing it, but I did find the cause, I think: when I deploy the app it
> also restarts a delayed_job daemon. So while the rails app is loading the
> delayed_job process is loading a rails environment as well. I had this in my
> environment.rb :
>
>   Sass::Plugin.options[:template_location] =
> "#{RAILS_ROOT}/app/stylesheets"
>   Sass::Plugin.options[:css_location] =
> "#{RAILS_ROOT}/public/stylesheets/compiled"
>   Sass::Plugin.options[:style] = :compressed
>   Sass::Plugin.update_stylesheets
>
> I.e., both processes try to update the stylesheets at the same time, which
> may result in the error message I regularly see ?
>
> I've now moved this into an after deploy_code hook in capistrano using the
> sass executable.
>
> While I was looking into this I found that haml always insert
> Sass::Plugin::Rack in my middleware. While it doesn't do much as long I've
> got the :never_update option set to false, I'd kinda prefer haml not to
> insert that middleware in staging/production mode. Is there a way to prevent
> this? (I'm now calling
> Rails.configuration.middleware.delete(Sass::Plugin::Rack) in my
> application.rb, but it's rather ugly)
>
>
>
> Cheers,
> Lawrence
>
>
>
> No, it's not. Do you have a way of consistently reproducing it?
>
> On Thu, Jul 29, 2010 at 11:49 PM, Lawrence Pit <[email protected]>wrote:
>
>>
>>
>> I'm getting this error as well lately, but on a linux box, when deploying
>> a new app. It happens sporadically, and happens with a random .sassc file.
>>
>> Warning. Error encountered while reading cache /srv/
>> example.com/releases/20100730063411/tmp/sass-cache/582473ecf79940f1d87ddbbc4ab0092dc3255043/posts.sassc:
>> end of file reached
>>
>> Using Haml/Sass 3.0.13 (Classy Cassidy)
>>
>> Is this a known error?
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Haml" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <haml%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/haml?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to