Created
December 21, 2011 19:02
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yup, that's it! Thank you for taking the time.