mirror of
https://github.com/jbranchaud/til
synced 2026-01-05 16:18:01 +00:00
Add Update The Gmefile Bundled With Version as a Ruby til
This commit is contained in:
@@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
|
||||
|
||||
For a steady stream of TILs, [sign up for my newsletter](https://tinyletter.com/jbranchaud).
|
||||
|
||||
_1050 TILs and counting..._
|
||||
_1051 TILs and counting..._
|
||||
|
||||
---
|
||||
|
||||
@@ -899,6 +899,7 @@ _1050 TILs and counting..._
|
||||
- [Uninstall Specific Version Of A Ruby Gem](ruby/uninstall-specific-version-of-a-ruby-gem.md)
|
||||
- [Unpacking Strings Into Binary](ruby/unpacking-strings-into-binary.md)
|
||||
- [Up And Down With Integers](ruby/up-and-down-with-integers.md)
|
||||
- [Update The Gemfile Bundled With Version](ruby/update-the-gemfile-bundled-with-version.md)
|
||||
- [Use A Case Statement As A Cond Statement](ruby/use-a-case-statement-as-a-cond-statement.md)
|
||||
- [Use dotenv In A Non-Rails Project](ruby/use-dotenv-in-a-non-rails-project.md)
|
||||
- [Use Tap For Better Test Data Setup](ruby/use-tap-for-better-test-data-setup.md)
|
||||
|
||||
29
ruby/update-the-gemfile-bundled-with-version.md
Normal file
29
ruby/update-the-gemfile-bundled-with-version.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# Update The Gemfile Bundled With Version
|
||||
|
||||
When you run `bundle install`, whatever is the latest version of `bundler`
|
||||
installed locally will be used. Your `Gemfile` dependencies will be installed
|
||||
and the `Gemfile.lock` will be marked at the bottom with a signature for the
|
||||
version of `bundler` that was used.
|
||||
|
||||
```ruby
|
||||
# Gemfile.lock
|
||||
...
|
||||
|
||||
BUNDLED WITH
|
||||
1.1.17
|
||||
```
|
||||
|
||||
On future `bundle install` calls, a matching major version of Bundler will be
|
||||
used. If you'd like to migrate from 1.x.x to 2.x.x or vice versa, or even if
|
||||
you want to explicitly change minor versions, you can run:
|
||||
|
||||
```bash
|
||||
$ bundle update --bundler=2.2.4
|
||||
```
|
||||
|
||||
This will bundle your project with `2.2.4` and update the `BUNDLED WITH`
|
||||
section to reflect that.
|
||||
|
||||
Use the version that makes sense for you with the `--bundler` flag.
|
||||
|
||||
[source](https://bundler.io/guides/bundler_2_upgrade.html#upgrading-applications-from-bundler-1-to-bundler-2)
|
||||
Reference in New Issue
Block a user