GitLab管道-找不到Gemfile

时间:2020-10-30 09:28:15

标签: ruby-on-rails gitlab rubygems jekyll gitlab-ci

我对GitLab管道,Ruby和Jekyll相对较新。我已经在StackFlow上阅读了类似的问题,并尝试了一些方法,但是仍然出现错误“找不到Gemfile”。由于此处的大多数建议都包括确保Gemfile位于同一目录中,而且我非常确定,因此我上次运行ls作为管道的一部分。

实际上,我确认Gemfile与我运行的bundle install位于同一目录中。

这是我的配置-基本逐字逐字地介绍了GitLab的建议:

image: ruby:2.7

workflow:
  rules:
    - if: '$CI_COMMIT_BRANCH'

before_script:
  - gem install bundler
  - gem update --system
  - ls
  - bundle install

pages:
  stage: deploy
  script:
    - bundle exec jekyll build -d public
  artifacts:
    paths:
      - public
  rules:
    - if: '$CI_COMMIT_BRANCH == "master"'

test:
  stage: test
  script:
    - bundle exec jekyll build -d test
  artifacts:
    paths:
      - test
  rules:
    - if: '$CI_COMMIT_BRANCH != "master"'

我要附上管道成功开始的图片,并得到ls的屏幕截图。任何帮助将不胜感激。

0 个答案:

没有答案