Well, I don't use :always_update = true. All my sites now use Sass and Haml and only update on the "Nathan knows better" principle. The only source I need in my repo is the Sass, and if I need new CSS, I can ssh to the server and delete the relevant CSS, which causes the next request to regenerate the appropriate files. Maybe I'm misunderstanding the comment.
It would be simple to write a cap recipe to delete these files if you don't want to remember which ones to remove, but realistically, how often do you dork with production CSS in on a live server and not know what the outcome will be? Either 1) You know what CSS will change and you're willing to fire up vim or emacs or whatever on your production box; or 2) You're going to do a cap deploy, which alleviates the problem entirely because there won't be any CSS. Again, maybe I'm misunderstanding the issue. If you're really set on getting the CSS in place before the first request, can't capistrano curl > /dev/null some set of pages that will force this generation? --steve On Oct 3, 2007, at 10:03 AM, Hampton wrote: > Hrrrm.... I consider complete lack of support for production > generation of CSS to be a bug though... > > I mean, every single usage of Sass I have seen had required everyone > to set :always_update = true. > > How would you recommend someone gets it to generate when deploying on > a live server? > > -hampton. > > On 10/3/07, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote: >> >> This isn't a bug... at one point, Sass did update the stylesheets >> when >> init.rb was loaded, but this caused it not to recognize changes to >> the >> options hash, so it had to be removed. The documentation should be >> updated appropriately, though. >> >> - Nathan >> >> Hampton wrote: >>> No, this is a known bug right now. The generation is a little hit >>> and >>> miss... and its more on the miss right now. I'm hoping we can have >>> this sorted out really soon though. >>> >>> Your solution is about right though for the quick-patching. >>> >>> -hampton. >>> >>> On 10/3/07, mike jones <[EMAIL PROTECTED]> wrote: >>> >>>> Hi, >>>> I recently switched to using haml and sass for rails app and it >>>> rocks >>>> \m/(^o^)\m/ >>>> I have one question though: becuase the CSS files are now generated >>>> from sass I have excluded them from my subversion repo (mainly >>>> because >>>> I want to be able to generate using a different :style depending on >>>> the environment). This causes a problem in production as the css >>>> files >>>> are never generated. >>>> >>>> This documentation suggests that the should be generated "when the >>>> Rails server starts" in production, but I couldn't find anything in >>>> the code (after a cursory glance) where this is the case. >>>> >>>> I ended up adding the following to my enviroment.rb >>>> >>>> if RAILS_ENV == 'production' >>>> Sass::Plugin.options[:style] = :compact >>>> Sass::Plugin.update_stylesheets >>>> end >>>> >>>> Is this what you are expect to do or am I misreading the >>>> documentation / code? >>>> >>>> Cheers >>>> Mike >>>> >>>> >>>> >>> >>>> >>> >>> >> >> >>> >> > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
