Jekyll服务器未从shell脚本运行:在任何源中都找不到i18n-0.7.0

Jekyll服务器未从shell脚本运行:在任何源中都找不到i18n-0.7.0,shell,jekyll,Shell,Jekyll,如果我打字 捆绑执行杰基尔服务 进入Ubuntu终端,它会启动jekyll服务器。但是,如果我将其放入shell脚本中: #! /bin/bash cd /home/xxx/Documents/github/xxx bundle exec jekyll serve $SHELL 它给出了错误: Could not find i18n-0.7.0 in any of the sources Run `bundle install` to install missing gems. 按照这里给

如果我打字 捆绑执行杰基尔服务

进入Ubuntu终端,它会启动jekyll服务器。但是,如果我将其放入shell脚本中:

#! /bin/bash

cd /home/xxx/Documents/github/xxx
bundle exec jekyll serve
$SHELL
它给出了错误:

Could not find i18n-0.7.0 in any of the sources
Run `bundle install` to install missing gems.
按照这里给出的说明也不能解决这个问题。我尝试过在cd命令后插入暂停,并从正确的文件夹启动脚本,但都不起作用(也就是说,由于没有及时cd,这不是一个问题)
有什么想法吗?

您是否使用与手动操作相同的用户运行脚本?尝试将
bundle install
添加到脚本中:)是的,不,这也不起作用。