The running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4)

I am running into this error when trying to develop a website that is built using Jekyll.

zzrot@ASUS-X571GT-VX60GT:~/project_folder/buddhist_blog$ jekyll serve --livereload
Warning: the running version of Bundler (2.1.2) is older than the version that created the lockfile (2.1.4). We suggest you to upgrade to the version that created the lockfile by running `gem install bundler:2.1.4`.
Configuration file: /home/zzrot/project_folder/buddhist_blog/_config.yml
            Source: /home/zzrot/project_folder/buddhist_blog
       Destination: /home/zzrot/project_folder/buddhist_blog/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.473 seconds.
 Auto-regeneration: enabled for '/home/zzrot/project_folder/buddhist_blog'
LiveReload address: http://127.0.0.1:35729
    Server address: http://127.0.0.1:4000//
  Server running... press ctrl-c to stop.
        LiveReload: Browser connected
^Czzrot@ASUS-X571GT-VX60GT:~/project_folder/buddhist_blog$ bundle -v
Bundler version 2.1.4
zzrot@ASUS-X571GT-VX60GT:~/project_folder/buddhist_blog$ gem list bundler

*** LOCAL GEMS ***

bundler (2.2.31, 2.2.30, 2.1.4, default: 2.1.2)
zzrot@ASUS-X571GT-VX60GT:~/project_folder/buddhist_blog$ 

How do I make the default bundler version 2.1.4 instead of 2.1.2.

I have found this post on stackoverflow

ruby on rails - Warning: the running version of Bundler is older than the version that created the lockfile error - Stack Overflow

so I tried to use gem update --system to solve this issue but it did not work and gave me this error message:

zzrot@ASUS-X571GT-VX60GT:~$ gem update --system
Updating rubygems-update
Successfully installed rubygems-update-3.2.31
Parsing documentation for rubygems-update-3.2.31
Done installing documentation for rubygems-update after 0 seconds
Parsing documentation for rubygems-update-3.2.31
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.2.31
Traceback (most recent call last):
	5: from setup.rb:22:in `<main>'
	4: from setup.rb:22:in `require'
	3: from /home/zzrot/gems/gems/rubygems-update-3.2.31/lib/rubygems.rb:1332:in `<top (required)>'
	2: from /home/zzrot/gems/gems/rubygems-update-3.2.31/lib/rubygems.rb:1332:in `require'
	1: from /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:49:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:50:in `<class:Specification>': undefined method `rubyforge_project=' for class `Gem::Specification' (NameError)
	3: from setup.rb:22:in `<main>'
	2: from setup.rb:22:in `require'
	1: from /home/zzrot/gems/gems/rubygems-update-3.2.31/lib/rubygems.rb:1328:in `<top (required)>'
/home/zzrot/gems/gems/rubygems-update-3.2.31/lib/rubygems.rb:1341:in `rescue in <top (required)>': undefined method `rubyforge_project=' for class `Gem::Specification' (NameError)
Loading the rubygems/defaults/operating_system.rb file caused an error. This file is owned by your OS, not by rubygems upstream. Please find out which OS package this file belongs to and follow the guidelines from your OS to report the problem and ask for help.
zzrot@ASUS-X571GT-VX60GT:~$ ```


and inside my specifications folder I did not find the 2.1.2 version... also it does not contain a default folder.  LOL

![Screenshot from 2021-11-14 00-20-19|248x500](upload://3Tx4SxMu9XdwsTNjX1H46MqoiIV.png)

and inside my specifications folder I did not find the 2.1.2 version… also it does not contain a default folder. LOL

Did you try running the command it suggests?

gem install bundler:2.1.4

I’m sure updating it is the correct thing to do but I guess if nothing else works you might try deleting the lock file (I would back it up first).

yeah I did. I installed it a couple of time.

Even after installation, I still, got the same error.

After I delete the gem.lock file, what do I need to install to make it back??

There are a lot of stuff in my lock file.

PATH
  remote: .
  specs:
    just-the-docs (0.3.3)
      jekyll (>= 3.8.5)
      jekyll-seo-tag (~> 2.0)
      rake (>= 12.3.1, < 13.1.0)

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.8.0)
      public_suffix (>= 2.0.2, < 5.0)
    colorator (1.1.0)
    concurrent-ruby (1.1.9)
    em-websocket (0.5.3)
      eventmachine (>= 0.12.9)
      http_parser.rb (~> 0)
    eventmachine (1.2.7)
    ffi (1.15.4)
    forwardable-extended (2.6.0)
    http_parser.rb (0.8.0)
    i18n (1.8.11)
      concurrent-ruby (~> 1.0)
    jekyll (4.2.1)
      addressable (~> 2.4)
      colorator (~> 1.0)
      em-websocket (~> 0.5)
      i18n (~> 1.0)
      jekyll-sass-converter (~> 2.0)
      jekyll-watch (~> 2.0)
      kramdown (~> 2.3)
      kramdown-parser-gfm (~> 1.0)
      liquid (~> 4.0)
      mercenary (~> 0.4.0)
      pathutil (~> 0.9)
      rouge (~> 3.0)
      safe_yaml (~> 1.0)
      terminal-table (~> 2.0)
    jekyll-sass-converter (2.1.0)
      sassc (> 2.0.1, < 3.0)
    jekyll-seo-tag (2.7.1)
      jekyll (>= 3.8, < 5.0)
    jekyll-watch (2.2.1)
      listen (~> 3.0)
    kramdown (2.3.1)
      rexml
    kramdown-parser-gfm (1.1.0)
      kramdown (~> 2.0)
    liquid (4.0.3)
    listen (3.7.0)
      rb-fsevent (~> 0.10, >= 0.10.3)
      rb-inotify (~> 0.9, >= 0.9.10)
    mercenary (0.4.0)
    pathutil (0.16.2)
      forwardable-extended (~> 2.6)
    public_suffix (4.0.6)
    rake (13.0.6)
    rb-fsevent (0.11.0)
    rb-inotify (0.10.1)
      ffi (~> 1.0)
    rexml (3.2.5)
    rouge (3.26.1)
    safe_yaml (1.0.5)
    sassc (2.4.0)
      ffi (~> 1.9)
    terminal-table (2.0.0)
      unicode-display_width (~> 1.1, >= 1.1.1)
    unicode-display_width (1.8.0)

PLATFORMS
  ruby

DEPENDENCIES
  bundler (~> 2.1.4)
  just-the-docs!

BUNDLED WITH
   2.1.4

wait… I restarted my machine and now the error is gone…

=.=

nevermind it is back…