Bundler warning

When I run the jekyll build command, I keep getting the following warning:

Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.2.29).

The version of bundler is the desired version in the warning, but the default version is 2.1.2

$ bundle -v
Bundler version 2.2.29

$ gem list bundler

*** LOCAL GEMS ***

bundler (2.2.29, default: 2.1.2)

To solve this warning:

  1. Find where the gems are installed by running gem environment command.

    You can see INSTALLATION DIRECTORY and GEM PATHS.

  2. Delete the .gemspec file for the version of bundler you want to remove.

    $ rm <installation_directory>/specifications/default/bundler-2.1.2.gemspec
    

Check again:

$ gem list bundler

*** LOCAL GEMS ***

bundler (2.2.29)

Tags:

Updated: