Cannot exec jekyll

I’m trying to update a website, but I’m running into an issue running the bundle exec jekyll serve command.

I get the following error:

bundler: failed to load command: jekyll (/home/user/.ruby/bin/jekyll)
<internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require': cannot load such file -- erb (LoadError)
Did you mean?  drb
	from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/user/.ruby/gems/jekyll-4.3.4/lib/jekyll/commands/new.rb:3:in `<top (required)>'
	from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/user/.ruby/gems/jekyll-4.3.4/lib/jekyll.rb:13:in `block in require_all'
	from /home/user/.ruby/gems/jekyll-4.3.4/lib/jekyll.rb:12:in `each'
	from /home/user/.ruby/gems/jekyll-4.3.4/lib/jekyll.rb:12:in `require_all'
	from /home/user/.ruby/gems/jekyll-4.3.4/lib/jekyll.rb:188:in `<top (required)>'
	from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from <internal:/usr/lib/ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/user/.ruby/gems/jekyll-4.3.4/exe/jekyll:8:in `<top (required)>'
	from /home/user/.ruby/bin/jekyll:25:in `load'
	from /home/user/.ruby/bin/jekyll:25:in `<top (required)>'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/cli/exec.rb:58:in `load'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/cli/exec.rb:23:in `run'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/cli.rb:455:in `exec'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/cli.rb:35:in `dispatch'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/cli.rb:29:in `start'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/exe/bundle:28:in `block in <top (required)>'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
	from /home/user/.local/share/gem/ruby/3.2.0/gems/bundler-2.5.19/exe/bundle:20:in `<top (required)>'
	from /usr/local/bin/bundle:25:in `load'
	from /usr/local/bin/bundle:25:in `<main>'

I’m running ruby 3.2.5. Jekyll used to run with no issue. I have already tried a full reinstall of ruby and all gems to no avail.
What am I missing? Even running gem install erb does not solve the issue.

fairly sure you have ruby (or some of the gems) installed twice - once in home/user and the other internally whatever that means. I think some systems come with a system ruby that sometimes causes issues when you then install ruby on your own.

I’d uninstall it and then see if it is still installed? I think there is also a which ruby command that may help?

Copy and paste it on GPT, and say you are not a programmer expert. So it will give you easy steps to get a solution.