Cannot load such … bundler-2.2.7

I have a jekyll site I haven’t updated in a long time. I wanted to make some updates today, but nothing I do with bundle works. I always get this error:

12275 01:31: repo/ (main) $ bundle update
/usr/local/opt/ruby/bin/bundle:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.7/exe/bundle (LoadError)
	from /usr/local/opt/ruby/bin/bundle:23:in `<main>'
12275 01:32: repo/ (main) $ bundle install
/usr/local/opt/ruby/bin/bundle:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/3.0.0/gems/bundler-2.2.7/exe/bundle (LoadError)
	from /usr/local/opt/ruby/bin/bundle:23:in `<main>'

Googling turns up a lot of related problems, but so far none of those solutions (which mostly revolve around installing or updating gems) has worked for me.

Appreciate any help!

can you try using ruby 2.7? I think ruby 3 has some minor issues.

If that doesn’t work try posting the full output - sometimes there are other things that are wrong.

Hi there. I agree with @rdyar. Please share the entire output, even if it is ugly and long :slight_smile:

That’s pretty much all the output. How do I try ruby 2.7?

Thing is, my other Jekyll site works fine. Hmm, lemme compare the two gemfiles…okay the working site specifies Jekyll without a version, the broken one specified a version. I removed that, tried again, got the same error. Deleted Gemfile.lock, and now it’s working.

Thanks!

1 Like

Is your site on a public repo? If so, can you share it?