Whenever I get this error, I have to again do a google search. So, this post is for me not to do that again!

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Could not find 'bundler' (2.1.4) required by your .Gemfile.lock.
(Gem::GemNotFoundException)
To update to the latest version installed on your system,
run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`
Could not find 'bundler' (2.1.4) required by your .Gemfile.lock. (Gem::GemNotFoundException) To update to the latest version installed on your system, run `bundle update --bundler`. To install the missing version, run `gem install bundler:2.1.4`
Could not find 'bundler' (2.1.4) required by your .Gemfile.lock.
 (Gem::GemNotFoundException)
To update to the latest version installed on your system,
run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.1.4`

Unfortunately, the suggestions don’t quite work.

The correct way to fix this is to run these three commands:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
gem install --default bundler
gem update --system
bundler update --bundler
gem install --default bundler gem update --system bundler update --bundler
gem install --default bundler
gem update --system
bundler update --bundler

Courtesy of StackOverflow. (The correct answer on StackOverflow didn’t quite work either!)