I have a project that requires sass v3.4, but sass-rails currently has this in its sass-rails.gemspec:
s.add_dependency 'sass', '~> 3.2.0'
The latest version (master branch) has gone backwards even more:
s.add_dependency 'sass', '~> 3.1'
From github, I can see that sass-rails works with sass v3.4 and has testing for it. It also has a curious "gemfiles" directory with a bunch of files like this Gemfile-sass-3-4:
source "https://rubygems.org"
# Specify your gem"s dependencies in sass-rails.gemspec
gemspec path: ".."
gem "rails"
gem "sass", "~> 3.4.0"
How to make use of this file? Or how do I make use of sass 3.4 without forking the sass-rails git repo and just changing it? Is this even possible?
The best I can find to do is put this in my Gemfile:
gem 'sass', '~> 3.4'
But bundle update gives me this error:
$ bundle update sass
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies.......
Bundler could not find compatible versions for gem "sass":
In Gemfile:
sass-rails (~> 4.0.3) ruby depends on
sass (~> 3.2.2) ruby
sass (~> 3.4) ruby
And a sort of side (related) question... Why is sass-rails using such an old version of sass?
The version specifier '~> 3.1' means the same as '>= 3.1' AND '< 4.0', so the latest version has gone forward not backward. Make sure you remove any version specifier from sass-rails in your Gemfile and then run:
If you don't have any other gems tied to older version of sass, it should upgrade it. If that does not do the trick, post the contents of your Gemfile.lock so we can see what other gems might be conflicting.
PS. The gemfiles directory in the sass-rails repository is there to support automated testing against multiple versions of sass on travis-ci.org.