bundler: command not found
bundler: command not found means the bundle executable isn’t on your PATH — Bundler needs to be installed as a gem before you can use it.
What It Means
Bundler is a Ruby gem that manages application dependencies by reading a Gemfile and resolving compatible versions. Unlike gem, which comes bundled with Ruby, Bundler is a separate gem that must be installed explicitly. When you type bundle install and get “command not found”, it means the bundle executable isn’t on your PATH.
Why It Happens
- Bundler isn’t installed — it’s not bundled with Ruby by default in all setups.
- Bundler is installed for a different Ruby version (via rbenv or RVM) than the one currently active.
- The gem binaries directory isn’t in your PATH.
- You installed Bundler globally but your Bundler user directory isn’t on PATH.
- The
bundlergem installation failed or was interrupted.
How to Fix It
Step 1: Install Bundler
This is the most common fix:
gem install bundlerIf you get a permission error, you may need:
sudo gem install bundler # Not recommended — use rbenv/RVM insteadOr with a version manager:
# With rbenv — gems install per Ruby version automatically
gem install bundler
rbenv rehash # Make shims availableStep 2: Verify the installation
bundler --version
# Or
bundle --versionBoth bundler and bundle commands should work.
Step 3: Check your PATH
If Bundler is installed but not found:
gem environment gemdir
# Example output: /home/user/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0
ls $(gem environment gemdir)/bin
# Check if 'bundle' and 'bundler' are thereIf the gem bin directory isn’t in your PATH, add it:
echo 'export PATH="$PATH:$(ruby -e "puts Gem.bindir")"' >> ~/.bashrc
source ~/.bashrcStep 4: Make sure you’re using the correct Ruby version
ruby --version
# If you switched Ruby versions, reinstall Bundler:
rbenv global 3.3.0
gem install bundlerStep 5: Run bundle install in your project
Once Bundler is available:
cd your-project
bundle installBuilt by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro