<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Sass production woes in Rails</title>
	<atom:link href="http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/</link>
	<description>CitrusByte</description>
	<pubDate>Fri, 21 Nov 2008 10:49:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Chu Yeow</title>
		<link>http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/#comment-93</link>
		<dc:creator>Chu Yeow</dc:creator>
		<pubDate>Thu, 07 Aug 2008 19:46:55 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=42#comment-93</guid>
		<description>"Thanks for pointing this out! I've been puzzling over this for awhile and with ideas from your blog post and everyone's comments, arrived at manually generating the stylesheets after each deploy. I have a rake task with this task: namespace :sass do desc 'Updates stylesheets if necessary from their Sass templates.' task :update =&#62; :environment do Sass::Plugin.update_stylesheets end end And have a cap task mirroring this that is called "after 'deploy'": namespace :sass do desc 'Updates the stylesheets generated by Sass' task :update, :roles =&#62; :app do invoke_command "cd #{latest_release}; RAILS_ENV=#{rails_env} rake sass:update" end # Generate all the stylesheets manually (from their Sass templates) after each deploy. after 'deploy', 'sass:update' end "</description>
		<content:encoded><![CDATA[<p>&#8220;Thanks for pointing this out! I&#8217;ve been puzzling over this for awhile and with ideas from your blog post and everyone&#8217;s comments, arrived at manually generating the stylesheets after each deploy. I have a rake task with this task: namespace :sass do desc &#8216;Updates stylesheets if necessary from their Sass templates.&#8217; task :update =&gt; :environment do Sass::Plugin.update_stylesheets end end And have a cap task mirroring this that is called &#8220;after &#8216;deploy&#8217;&#8221;: namespace :sass do desc &#8216;Updates the stylesheets generated by Sass&#8217; task :update, :roles =&gt; :app do invoke_command &#8220;cd #{latest_release}; RAILS_ENV=#{rails_env} rake sass:update&#8221; end # Generate all the stylesheets manually (from their Sass templates) after each deploy. after &#8216;deploy&#8217;, &#8217;sass:update&#8217; end &#8220;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh Adams</title>
		<link>http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/#comment-71</link>
		<dc:creator>Josh Adams</dc:creator>
		<pubDate>Thu, 17 Jul 2008 17:47:34 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=42#comment-71</guid>
		<description>Ari,

My only change to your suggestion would be to use 'latest_release' a la http://pastie.org/235754</description>
		<content:encoded><![CDATA[<p>Ari,</p>
<p>My only change to your suggestion would be to use &#8216;latest_release&#8217; a la <a href="http://pastie.org/235754" rel="nofollow">http://pastie.org/235754</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Weizenbaum</title>
		<link>http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/#comment-69</link>
		<dc:creator>Nathan Weizenbaum</dc:creator>
		<pubDate>Fri, 21 Mar 2008 17:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=42#comment-69</guid>
		<description>I guess I'm misunderstanding the problem. If the issue isn't getting Sass to regenerate the CSS files when they change, what is it?

Also, I'd advise against undefining Sass::RAILS_LOADED to fix this problem. That constant is an implementation detail; it's possible that it will change or mean something different in future releases.</description>
		<content:encoded><![CDATA[<p>I guess I&#8217;m misunderstanding the problem. If the issue isn&#8217;t getting Sass to regenerate the CSS files when they change, what is it?</p>
<p>Also, I&#8217;d advise against undefining Sass::RAILS_LOADED to fix this problem. That constant is an implementation detail; it&#8217;s possible that it will change or mean something different in future releases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff</title>
		<link>http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/#comment-70</link>
		<dc:creator>Geoff</dc:creator>
		<pubDate>Fri, 21 Mar 2008 17:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=42#comment-70</guid>
		<description>I don't quite think I understand the problem here. Are you consistently changing your SASS file on the production server? Surely you'd be better making your changes, testing those changes, committing to version control and then deploying the latest changes to your production server. Restarting the application server on the production server would be done as part of the deployment process.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t quite think I understand the problem here. Are you consistently changing your SASS file on the production server? Surely you&#8217;d be better making your changes, testing those changes, committing to version control and then deploying the latest changes to your production server. Restarting the application server on the production server would be done as part of the deployment process.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Weizenbaum</title>
		<link>http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/#comment-67</link>
		<dc:creator>Nathan Weizenbaum</dc:creator>
		<pubDate>Thu, 20 Mar 2008 17:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=42#comment-67</guid>
		<description>The issue here is that Sass stylesheets take a long time to generate, and there's some overhead for just checking if they need to be regenerated. Thus, in production mode the default is to never check for regeneration except during server startup.

There are a couple easy ways around this. First, you could manually call Sass::Plugin.update_stylesheets. Here's a Capistrano task that should work for it (hoping this is the right code block formatting):

desc "Update Sass stylesheets" task :sass do run "cd #{releasepath} &#38;&#38; ruby -rconfig/environment -e 'Sass::Plugin.updatestylesheets'" end

A better way, if you want Sass to check to see if updates need to be run for each request, would be to configure Sass in environment.rb:

Sass::Plugin.options[:always_check] = true

-------
Okay, no code formatting, I guess. Here's a pastie of that cap task: http://pastie.caboo.se/168250.</description>
		<content:encoded><![CDATA[<p>The issue here is that Sass stylesheets take a long time to generate, and there&#8217;s some overhead for just checking if they need to be regenerated. Thus, in production mode the default is to never check for regeneration except during server startup.</p>
<p>There are a couple easy ways around this. First, you could manually call Sass::Plugin.update_stylesheets. Here&#8217;s a Capistrano task that should work for it (hoping this is the right code block formatting):</p>
<p>desc &#8220;Update Sass stylesheets&#8221; task :sass do run &#8220;cd #{releasepath} &amp;&amp; ruby -rconfig/environment -e &#8216;Sass::Plugin.updatestylesheets&#8217;&#8221; end</p>
<p>A better way, if you want Sass to check to see if updates need to be run for each request, would be to configure Sass in environment.rb:</p>
<p>Sass::Plugin.options[:always_check] = true</p>
<p>&#8212;&#8212;-<br />
Okay, no code formatting, I guess. Here&#8217;s a pastie of that cap task: <a href="http://pastie.caboo.se/168250" rel="nofollow">http://pastie.caboo.se/168250</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ari</title>
		<link>http://blog.citrusbyte.com/2008/03/20/sass-production-woes-in-rails/#comment-68</link>
		<dc:creator>Ari</dc:creator>
		<pubDate>Thu, 20 Mar 2008 17:47:19 +0000</pubDate>
		<guid isPermaLink="false">http://localhost/wordpress/?p=42#comment-68</guid>
		<description>Problem is that the always check will cause the check to run, which is still not ideal. Problem with rails 2.0 is that the Sass: :RAILS_LOADED constant is set when it gets to the gem.

You can do it either with that cap task or by unsetting the constant. Otherwise, you still incur that overhead during the runtime.

This way, you get the best of the development environment while maintaining the production-ready environment</description>
		<content:encoded><![CDATA[<p>Problem is that the always check will cause the check to run, which is still not ideal. Problem with rails 2.0 is that the Sass: :RAILS_LOADED constant is set when it gets to the gem.</p>
<p>You can do it either with that cap task or by unsetting the constant. Otherwise, you still incur that overhead during the runtime.</p>
<p>This way, you get the best of the development environment while maintaining the production-ready environment</p>
]]></content:encoded>
	</item>
</channel>
</rss>
