'bundler: command not found: jekyll

I have a project for uni where we need to build upon an existing project. To view it locally I need to build it with Jekyll. I have never worked with it and am generally not very experienced with coding. To build the website we are supposed to use

bundle exec jekyll build -d public

Now this gives me the error

bundler: command not found: jekyll
Install missing gem executables with `bundle install`

When I check my ruby version it says

ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x86_64-darwin20]

Also tried some PATH redirecting so which ruby gives me

/usr/local/opt/ruby/bin/ruby

the gems are under

/usr/local/opt/ruby/bin/gem

I'm pretty lost now and not sure what to do. I'm working on a Mac btw :) Thanks for any help



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source