Skip to content

Instantly share code, notes, and snippets.

@kaelig
Created December 21, 2011 19:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaelig/1507226 to your computer and use it in GitHub Desktop.
Save kaelig/1507226 to your computer and use it in GitHub Desktop.
Sass and Compass in Ruby On Rails 3.1.1 w/ Asset Pipeline
# /config/initializers/compass.rb
require 'compass'
#
# Hot fix for sprite in Compass alpha
#
module Compass::SassExtensions::Functions::ImageSize
class ImageProperties
def initialize(file)
file = file.to_path if file.kind_of? Sprockets::StaticAsset
@file = file
@file_type = File.extname(@file)[1..-1]
end
end
end
# In your Gemfile:
gem 'haml'
gem 'sass'
gem 'compass', :git => 'git://github.com/chriseppstein/compass.git', :branch => 'master' # Rails 3.1.1 compatible version is still in alpha…
gem "sass-rails", "~> 3.1.5" # Required by Rails 3.1.1
@andreortiz82
Copy link

Yup, that's it! Thank you for taking the time.

@kaelig
Copy link
Author

kaelig commented Dec 21, 2011 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment