Description
I've already read about the original issue.
Today I had some trouble integrating compass with an existing Rails 4.0.0 application. I was using the 2.0.alpha.0
version of the gem, but still no luck.
After some googling, I found that the problem was caused by the version of compass used by Rails.
It appears that other people out there are still dealing with the same issue (judging by the dates of the questions on Stack Overflow), and there are contradicting theories on whether to use or not group :asset
.
I decided to share what I did to make it work.
For some reason 2.0.alpha.0
doesn't apply a strict requirement on the version of the base compass gem. This proved to be the problem.
You'll need a version of compass from the 0.13.alpha
line. I tested it with 0.13.alpha.7
and 0.13.alpha.12
.
This new version of compass will also require a new version of sass.
Since the Gemfile.lock probably specifies a previous version (Rails' default), you'll need to run bundle update
instead of bundle install
.
If you don't want to update all you gems at the same time (for good reason), just run bundle update sass
.
Long story short, in your Gemfile (no group :assets
required):
gem "sass", "~> 3.3.0.rc.2"
gem "compass", "~> 0.13.alpha.12"
gem "compass-rails", "~> 2.0.alpha.0"
And then:
$ bundle update sass
...
Using foobar
Using foobar
Installing sass (3.3.0.rc.2)
Installing compass (0.13.alpha.12)
Installing compass-rails (2.0.alpha.0)
Using foobar
...
....done.