Solution to bundler requires Ruby version >= 2.3.0

The error is as follows:

An error was reported during the installation of bundler;

ERROR: Error installing bundler: bundler requires Ruby version >= 2.3.0.

View current ruby ​​version

ruby -v # 2.0

1. Install rvm

curl -sSL https://get.rvm.io | bash -s stable
source /usr/local/rvm/scripts/rvm

2. Check the known ruby ​​versions in the rvm library

rvm list known

3. Install a ruby ​​version

rvm install 2.6

4. Use a ruby ​​version

rvm use 2.6.6

5. Set default version

rvm remove 2.3.0
already gone 

6. Confirm the final version

ruby --version 

7. Execute again

gem install bundler