rbenv: bundler: command not found

Viewed 554

In a bid to run a Rails App on my local Ubuntu, I attempted to install the gems with the command gem install bunder / bundle install. However, I got the error:

rbenv: bundler: command not found . The `bundler' command exists in these Ruby versions:

2.4
2.4.1
2.4.2
2.4.5
2.5
2.5.0
2.5.1
2.5.3
2.5.7
2.5.8
2.6
2.6.0
2.6.1
2.6.3
2.6.4
2.6.5
2.6.6
2.6.7
2.6.8

3 Answers

I fixed it by running the command gem install bundler in the root directory of the rails app.

in my specific case, I was dealing with an old Ruby version

I had to first install bundler
gem install bundler
then it complained that it needed a specific old version:
To install the missing version, run gem install bundler:1.17.3
installing that specific old version fixed my issue

OS X: brew install rbenv
Debian apt-get install rbenv
Ubuntu apt-get install rbenv
Kali Linux apt-get install rbenv
Raspbian apt-get install rbenv

https://command-not-found.com/rbenv

Related