安装 rbenv

git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="~/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(~/.rbenv/bin/rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
apt install -y build-essential libssl-dev zlib1g-dev

安装 ruby

rbenv install 2.7.1
rbenv global 2.7.1

安装 bundler

gem install bundler

安装项目依赖

cd gitbasedir
bundle install

运行项目

bundle exec jekyll serve --port 4000