0

In Gemfile I had:

gem 'bootstrap-sass', '~> 3.0.3.0'

I have now changed it to the following, which is the latest version at the time of this writing:

gem 'bootstrap-sass', '~> 3.1.1.1'

Taking a look at both bootstrap-sass (3.0.3.0) and bootstrap-sass (3.1.1.1) on RubyGems.org, I see that both versions have runtime dependencies of:

sass ~> 3.2

Taking a look at sass itself, I see that it has no runtime dependencies, and that its latest version is:

gem 'sass', '~> 3.3.7'

After making the change mentioned above (to bootstrap-sass) I ran bundle, and saw the following:

...
Using sass 3.2.19
Installing bootstrap-sass 3.1.1.1 (was 3.0.3.0)
...

My question is why wasn't sass updated, and how can I update it without referencing it in Gemfile?

For what it's worth, here is some more info:

-bash> grep sass Gemfile.lock 
    bootstrap-sass (3.1.1.1)
      sass (~> 3.2)
      sass-rails (~> 4.0)
    sass (3.2.19)
    sass-rails (4.0.3)
      sass (~> 3.2.0)
  bootstrap-sass (~> 3.1.1.1)
  sass-rails (~> 4.0.3)
user664833
  • 18,397
  • 19
  • 91
  • 140

1 Answers1

1

As you noted, both bootstrap-sass versions (3.0.3.0 and 3.1.1.1) have a dependency of:

sass ~> 3.2

What this means is that they require the highest 3.2.x version of sass, but not 3.3. That's what the ~> means, and that is why your sass is 3.2.19.

So even if you explicitly say:

gem 'sass', '~> 3.3.7'

Bundler won't update it because it sees that bootstrap-sass depends on a lower version of sass.

user664833
  • 18,397
  • 19
  • 91
  • 140
Ege Ersoz
  • 6,461
  • 8
  • 34
  • 53
  • It happens. Good luck with your project. :) – Ege Ersoz May 27 '14 at 05:57
  • 1
    > `sass ~> 3.2` ... What this means is that they require the highest 3.2.x version of sass, but not 3.3. This is not correct. `~> 3.2` means it requires a minimum of 3.2.x up to a maximum of (but not including) 4.0. E.g. It will match 3.3, 3.4, 3.5 etc, but not 4.0 or 4.1. – Ryan McGeary Nov 17 '14 at 18:22
  • I'm not sure that's true. Please see here: http://stackoverflow.com/questions/5170547/what-does-tilde-greater-than-mean-in-ruby-gem-dependencies – Ege Ersoz Nov 17 '14 at 23:22