Rails: "Could not find bundler" (2.2.11) required by Gemfile.lock. (Gem::GemNotFoundException)
Solution 1
Make sure you're entering "bundle" update, if you have the bundler gem installed.
bundle update
If you don't have bundler installed, do gem install bundler.
Solution 2
I had this problem, then I did:
gem install bundler
then in your project folder do:
bundle install
and then you can run your project using:
bundle exec rails server
Solution 3
I had the same problem. This worked for me:
run rvm/script/rvm and also add it to your .profile or .bash_profile as shown in https://rvm.io/rvm/install/
use bundle without sudo
Solution 4
If You are using rvm, then try the following command:
rvmsudo gem install bundler
According to another question: Could not find rails (>= 0) amongst [] (Gem::LoadError)
Hope it helped, Cheers
Solution 5
The command is bundle update (there is no "r" in the "bundle").
To check if bundler is installed do : gem list bundler or even which bundle and the command will list either the bundler version or the path to it. If nothing is shown, then install bundler by typing gem install bundler.
Related videos on Youtube
Steven
Updated on July 08, 2022Comments
-
Steven 3 monthsWhen I try to do
bundler updateI get this error:.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [rake-0.8.7, rake-0.8.7, rubygems-update-1.8.4] (Gem::LoadError)I'm new to Ruby, can someone tell me what would cause this? Rake 0.8.7 is installed.
-
rmurphey about 10 yearsThanks for this. While I knew how to spell "bundle" vs "bundler", I'd completely forgotten that I reinstalled zsh and in the process accidentally blew this line away from my .zshrc. Had been pulling my hair out over this for a while :) -
AMIC MING over 9 yearsif you create a new applocation - rails new and if you get this error? -
ardavis over 9 yearsDo agem list bundlerand see if it shows up. If it does not, you need to install it as listed in my answer. -
Don Cote over 9 yearsgem install bundle -- this did it for me as well. -
NRR over 6 yearsThis happened for me after installing a new version of ruby using rvm. Then I had to rungem install bundleragain -
sealocal about 6 yearsNotice that the "bundle" gem is simply a gem that declares "bundler" as a dependency, which essentially fixes your typo. github.com/will/bundle/blob/… -
jonnyjava.net almost 6 yearsThis answer is old but for me has been the solution! -
rmcsharry almost 4 yearsMake sure this is the LAST line in your profile file -
collimarco about 1 yearYou may also need to runbundle update --bundler(e.g. to upgrade from bundler v1 to v2)