I used sudo bundle install
and that might be the cause of the issue?
Now I have:
gem -v
2.6.14ruby -v
Open Gemfile.lock, which is to be found in the root of your app folder. Scroll to the end of the file and see the bundler version used. Then you make sure you install the bundler version used:
gem install bundler -v x.xx.xx
Or - delete the Gemfile.lock and bundle if you have higher bundler version installed.
The choice is yours, my friend.
to install bundler that matches with your Gemfile.lock
use:
gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
gem update --system
will update the rubygems and will fix the problem.