Thanks, Jim.
I still don't see how this would force Sass compilation into the
/tmp/stylesheets directory.
I see that the source is being set to Rails.root/public/stylesheets/sass
but how does /tmp/stylesheets become the destination for Sass?
Thanks,
Wes
On 6/7/11 9:33 AM, Jim Gay wrote:
On Fri, Jun 3, 2011 at 6:42 PM, Wes Gamble<[email protected]> wrote:
On 6/1/11 10:42 AM, Jim Gay wrote:
You shouldn't need to turn off caching for this.
Inside config/initializers/compass.rb place this code
-----
require 'fileutils'
FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets"))
Sass::Plugin.options[:template_location] = (Rails.root + 'public' +
'stylesheets' + 'sass').to_s
require 'compass'
require 'compass/app_integration/rails'
Compass::AppIntegration::Rails.initialize!
-----
This line:
Sass::Plugin.options[:template_location] = (Rails.root + 'public' +
'stylesheets' + 'sass').to_s
effectively breaks the ability to pull in "compass"
(sass/admin/partials/_base.sass) which causes admin. pages to render
incorrectly. I have no idea why, but it does.
How is the Rails.root/tmp/stylesheets directory supposed to get used in
production from this ?
I've decided to go with a no-compile-on-Heroku policy which is probably the
best way to go.
Wes
I'm sorry Wes. Have you tried this with "+=" instead of just "="?
I haven't had a chance to test that out, but thanks for pointing out the error.
I do intend to have this solved for the final 1.0, so thanks for the help.
-Jim