After a long overdue reading of the bunder documents, I pretty much understand why it’s a great thing compared to manual gem install.
But this came to me (and others) only recently, and now we have a hybrid environment. Our development machines are mostly fine. But when we deploy to production, Bundler tells capistrano to put the gems in shared/bundle/gems, which makes sense. But we still have manually installed gems in the normal .rvm location.
So now we know not to use “gem install” on production, but we’re dealing with version mismatches when we run Rake tasks directly. We can use “bundle exec rake foo:bar” to force the correct behavior, I think. But for now we have a bunch of outdated gems:
- Outdated gems installed by Bundler, and
- Gems we manually installed using
gem install
I would like to get things pristine. Is there any reason I shouldn’t use gem cleanup?
Hope this isn’t too convoluted 🙂
Thanks in advance.
gem cleanupwill keep the latest version of all gems, and remove older versions. What I think you want is this:rvm gemset emptymay be helpful) except Bundler.bundle installbundle execfrom now on.