Thanks a lot. I'll check if I can get it working and probably report back somewhere tomorrow.
Jeroen On Tue, Jul 27, 2010 at 8:47 PM, Nathan Weizenbaum <[email protected]> wrote: > It depends on how the Rails middleware stack is set up. Somewhere in there > is the Sass middleware, which will regenerate the CSS whenever it's hit. > However, if Rails puts the middleware for serving public/ higher in the > stack than the Sass middleware, you'll get the 404 before Sass ever has a > change to regenerate anything. > > I'll check it out when I have some time, but I'm not sure exactly when that > will be. You may be able to get a quick fix by manually using > Sass::Plugin::Rack in your config.ru, though. > > On Tue, Jul 27, 2010 at 11:30 AM, Jeroen van Dijk < > [email protected]> wrote: > >> Maybe we are talking about something different, because for me it really >> doesn't work. >> >> Just to be certain we are about the same things, this is what I do. I >> remove my screen.css and request my screen.css on the command line: >> >> curl localhost:3000/stylesheets/screen.css >> >> The first time I do this I get the 404 page, the second time curl shows me >> the stylesheet. So apparently a normal Rails request is needed to have the >> stylesheet be regenerated. >> >> Is this a bug then and should this work? Or did you mean something >> different? >> >> Either way, would love to have this working. Thanks for the suggestion of >> #update_stylesheets will have a look at it. >> >> Cheers, >> Jeroen >> >> On Tue, Jul 27, 2010 at 7:44 PM, Nathan Weizenbaum <[email protected]>wrote: >> >>> That should definitely be using the Rack middleware. It's possible that >>> Rails has some static-file middleware that takes precedence, though. >>> >>> In any case, calling Sass::Plugin.update_stylesheets will intelligently >>> update any stylesheets that need it. >>> >>> On Tue, Jul 27, 2010 at 1:00 AM, Jeroen van Dijk < >>> [email protected]> wrote: >>> >>>> Thanks for your quick response. I'm using Rails indeed, running on edge. >>>> So you are saying that a bare stylesheet request should work? >>>> >>>> Here is some info from my Gemfile: >>>> >>>> gem "rails", :git => "git://github.com/rails/rails.git", :ref => >>>> "53b34e84762b7f2d6b64" >>>> haml (3.0.13) >>>> compass (0.10.2) >>>> >>>> Should I update one of the above? >>>> >>>> On Tue, Jul 27, 2010 at 9:54 AM, Nathan Weizenbaum <[email protected]>wrote: >>>> >>>>> I assume you're using Sass within Rails, or some other Ruby framework? >>>>> If you're using a recent version of Sass and Rails, Sass should >>>>> automatically hook itself in as Rack middleware, and will update the >>>>> stylesheets on each request. What versions are you using? >>>>> >>>>> >>>>> On Tue, Jul 27, 2010 at 12:49 AM, Jeroen van Dijk < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi all, >>>>>> >>>>>> I've been using Sass (and Haml) for a while now and I'm a very happy >>>>>> user. Thanks for all the work you guys have put in it. >>>>>> >>>>>> Recently I came across livereload (http://github.com/mockko/ >>>>>> livereload). Really useful tool for any web developer. It actively >>>>>> monitors your files and reloads your page or assets without touching >>>>>> your browser manually. This works best for normal stylesheets and >>>>>> javascript files where it is just a reload of the specific asset file. >>>>>> For Sass this is different though. The whole page has to reload to >>>>>> update the stylesheets. I have been looking into this but I haven't >>>>>> seen a way around this. It seems that Sass needs a complete page >>>>>> request to generate the css files. For example, I removed the css >>>>>> files and did a curl request to just get the css page. This resulted >>>>>> in a 404. >>>>>> >>>>>> So my question is, is there a way to have Sass regenerate new css >>>>>> files solely based on a request of a css file? Say localhost:/3000/ >>>>>> stylesheets/screen.css?new_time_stamp_here . If not, what would be the >>>>>> fastest way to regenerate the Sass file. Currently, using Compass, I >>>>>> just call a command line command : `compass compile` from within the >>>>>> Ruby process, but this can be done faster I hope/assume. >>>>>> >>>>>> Looking forward to any new insights. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> Jeroen >>>>>> >>>>>> >>>>>> NB I'm using Sass with Compass, but I'm assuming the root cause/ >>>>>> question lies with Sass. >>>>>> >>>>>> -- >>>>>> 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]<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] <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] <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] <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] <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.
