Help with Bundler to figure out why it "downgraded" one of my gems
Today I checked gem outdated
as I do periodically. Found a few that needed updating:
$ gem outdated
ZenTest (4.6.1 < 4.6.2)
bcrypt-ruby (2.1.4 < 3.0.0)
factory_girl (2.0.4 < 2.0.5)
fog (0.10.0 < 0.11.0)
hike (1.2.0 < 1.2.1)
net-ssh (2.1.4 < 2.2.1)
rb-fsevent (0.4.3 < 0.4.3.1)
rdoc (3.9.2 < 3.9.3)
selenium-webdriver (2.4.0 < 2.5.0)
So I gem update开发者_如何学C
them and then bundle update
. Noticed bundle update
felt compelled to install an older version of fog: Installing fog (0.9.0)
? And not sure how to figure out what's causing this dependency to be downgraded. Things were working fine under fog 0.10.0
.
gem dependency -R fog
says only Carrierwave
is requiring it...and carrierwave
hasn't changed and was happy with fog 0.10.0.
Any ideas? Or tools I can use to troubleshoot/understand this?
Within your gemfile and within bundler it's considered a good practice to not necessarily use the latest and newest version of a gem.
For example if there is a line in your rails gemfile such as:
gem 'globalize3', "~> 0.1.0"
... it will get the latest gem such as 0.1.2, 0.1.3 etc. but will never use 0.2.1
This is to keep backward compatibility among gem dependencies. Bundler probably follows that practice in regard to fog.
精彩评论