Skip to content

Instantly share code, notes, and snippets.

@kyriacos
Forked from lstoll/Gemfile
Created January 10, 2011 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyriacos/772886 to your computer and use it in GitHub Desktop.
Save kyriacos/772886 to your computer and use it in GitHub Desktop.
# This configuration file works with both the Compass command line tool and within Rails.
# Require any additional compass plugins here.
require 'ninesixty'
project_type = :rails
project_path = RAILS_ROOT if defined?(RAILS_ROOT)
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "tmp/stylesheets"
sass_dir = "app/stylesheets"
environment = Compass::AppIntegration::Rails.env
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
gem 'compass', '0.10.2'
gem 'compass-960-plugin', :require => 'ninesixty'
gem 'haml', '3.0.10'
# Adapted from
# http://github.com/chriseppstein/compass/issues/issue/130
# and other posts.
# Create the dir
require 'fileutils'
FileUtils.mkdir_p(Rails.root.join("tmp", "stylesheets"))
Sass::Plugin.on_updating_stylesheet do |template, css|
puts "Compiling #{template} to #{css}"
end
Rails.configuration.middleware.insert_before('Rack::Sendfile', 'Rack::Static',
:urls => ['/stylesheets'],
:root => "#{Rails.root}/tmp")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment