Updating gems
I'm updating gems regularly for \d\d years now, but it is still hard to remember related commands. Should I use gem or bundle to upgrade bundle? Is it "update" or "upgrade"? Bwagh!
Updating Bundler:
bundle update --bundler
Note:
Gemfile.lockmay lock Bundler version withBUNDLED WITHvalue.Gemfile.lockmay cause an alternative bundler version installation duringbundle install.
Update system gems:
gem update --system
Getting gem paths and other environment variables:
gem env
Updating rbenv with Homenrew:
brew update
brew upgrade rbenv
Installing new Ruby version with rbenv:
rbenv install 3.2.2
bundle install
Somewhat related:
- Fixing Ruby environment for non-interactive shells
- Calling the original instance method after overriding in Ruby
- Stubbing environment variables in RSpec
- Downloading CleanShot images with Ruby
- Updating Ruby with asdf
- Preserving backtrace during exceptions wrapping in Ruby
- RSpec snippet for Sublime Text