How can I downgrade my rails version?
I have an app, in which my tests pass for rails 3.0.6. I've identified a git commit, where the only change is that I change the rails version in my Gemfile from 3.0.6 to 3.0.8, and I run bundle update. After that, my tests fail... fair enough. However, when I try to downgrade to 3.0.6, my tests STILL fail.. suggesting that something is not working with the downgrade. I try the following actions
change version in Gemfile from 3.0.8 to 3.0.8
run bundle update
rm Gemfile.lock
rm -rf vendor/bundle/*
bundle install
开发者_StackOverflow社区
And after doing that, my tests are still failing. I'm at a loss here.. am I missing something for the downgrade process?
EDIT:
I had a faulty assumption that nothing else changed when I changed the rails version in my Gemfile. By running
bundle update
my Gemfile.lock ended up updating some of my gems to their newer github versions, and these new commits broke things. When I refer to the working commit in my Gemfile, everything works again
gem "carrierwave", :git => 'https://github.com/jnicklas/carrierwave.git', :ref => "0d2e9ee8706074059cb78f2f85232caf17327952"
take a look at RVM (stands for ruby version manager)
and this article tell you all about how to manage your gems (e.g: for each project a seperate set of gem)
精彩评论