Skip to content

Instantly share code, notes, and snippets.

@kaelig
Created December 21, 2011 19:02
Show Gist options
  • Select an option

  • Save kaelig/1507226 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

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

@kaelig
Copy link
Copy Markdown
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