Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

How to integrate Compass with Rails 3.1 asset pipeline

View Gemfile
1 2 3 4 5 6
group :assets do
gem 'sass-rails', '~> 3.1.0'
gem 'coffee-rails', '~> 3.1.0'
gem 'uglifier'
gem 'compass'
end
View Gemfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
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
View Gemfile

Super extra minimal Compass to Rails 3.1 bootstrap

Update: these instructions are only valid until Compass version 0.12 goes stable. Then the hack won't be necessary.

Skips all of the nasty and bloated old Compass Rails integration. No need for that confusing "config/compass.rb" file, either.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.