Skip to content

Instantly share code, notes, and snippets.

@webdevotion
Created May 17, 2011 06:48
Show Gist options
  • Save webdevotion/976056 to your computer and use it in GitHub Desktop.
Save webdevotion/976056 to your computer and use it in GitHub Desktop.
heroku compass config
# This configuration file works with both the Compass command line tool and within Rails.
# Require any additional compass plugins here.
project_type = :rails
project_path = Compass::AppIntegration::Rails.root
# Set this to the root of your project when deployed:
http_path = "/"
environment = Compass::AppIntegration::Rails.env
if environment == 'production'
css_dir = "tmp/stylesheets"
sass_dir = "app/views/stylesheets"
else
css_dir = "public/stylesheets"
sass_dir = "app/views/stylesheets"
end
require 'compass'
require 'compass/app_integration/rails'
require 'fileutils'
Compass::AppIntegration::Rails.initialize!
environment = Compass::AppIntegration::Rails.env
if environment == 'production'
FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets"))
Rails.configuration.middleware.delete('Sass::Plugin::Rack')
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Sass::Plugin::Rack')
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Rack::Static',
:urls => ['/stylesheets'],
:root => "#{Rails.root}/tmp")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment