Skip to content

Instantly share code, notes, and snippets.

@laribee
Forked from chriseppstein/readme.md
Created December 28, 2011 03:46
Show Gist options
  • Save laribee/1526103 to your computer and use it in GitHub Desktop.
Save laribee/1526103 to your computer and use it in GitHub Desktop.
How to integrate Compass with Rails 3.1 asset pipeline

Super extra minimal Compass to Rails 3.1 bootstrap.

Skips all of the nasty and bloated old Compass Rails integration.

Note that this will only work for simple stylesheets and probably needs extra configuration for stuff like sprites.

module Compass
RAILS_LOADED = true
end
if defined?(Bundler)
Bundler.require(:default, :assets, Rails.env)
end
module MyPrecious
class Application < Rails::Application
config.assets.enabled = true
# that's it!
config.sass.load_paths << Compass::Frameworks['compass'].stylesheets_directory
end
end
group :assets do
gem 'sass-rails', '~> 3.1.0'
gem 'coffee-rails', '~> 3.1.0'
gem 'uglifier'
gem 'compass'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment