How to repair jekyll and bundle installation

Viewed 357

The command bundle exec jekyll serve stopped to work correctly on my system, and leads now to this error:

bash: /usr/local/bin/bundle: /usr/bin/ruby2.5: bad interpreter: No such file or directory

I don't know how it happened, but gem tells me that jekyll and bundle are not installed, when actually they are present in a different path:

$ which gem
/usr/bin/gem

$ which ruby
/usr/bin/ruby

$ which bundler
/usr/local/bin/bundler

$ which jekyll
/usr/local/bin/jekyll

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:    20.04
Codename:   focal

$ gem --version
3.1.2

$ ruby --version
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

I don't know how to undo that. I looked around and there are several ways to repair this (export a path, reinstall ruby), but I'm unsure which way is the less likely to break my system more.

0 Answers
Related