昨天我更新了gitlab 8.4.3到8.4.4,在升级期间我得到了一个与Gemfile.lock权限相关的错误,升级过程被中断。
今天,我无法访问我的gitlab安装,我将错误跟踪到一个丢失的gem,当我运行gitlab-rails
时,我得到了
Could not find ruby-saml-1.1.1 in any of the sources
Run `bundle install` to install missing gems.
当我尝试运行sudo -u git -H bundle install
时
sudo: bundle: command not found
我如何安装这个宝石?运行包安装的正确方法是哪一种?
通过apt-get安装/升级了gitlab。
更新: 2016-02-22
原来gitlab没有提供bundle install
命令,gems包含在.deb文件中。因此,我所需要做的就是跳过迁移,只需安装新版本,然后将所有文件正确安装到-once -运行迁移。
touch /etc/gitlab/skip-auto-migrations
apt-get dist-upgrade
gitlab-ctl reconfigure
protip:在排除故障时,确保所有设备都安装正确,然后运行gitlab-ctl reconfigure
;它可以修复常见的问题。
发布于 2016-02-23 05:46:51
gitlab不提供bundle install
命令,gems包含在.deb文件中。
所以,只需安装新版本(跳过迁移),然后运行迁移。
touch /etc/gitlab/skip-auto-migrations
apt-get dist-upgrade
gitlab-ctl reconfigure
发布于 2016-02-21 12:04:46
更新:更好的脚本
案例1。
image: ruby:2.1
# add bundle cache to 'vendor' for speeding up builds
cache:
paths:
- vendor/
before_script:
- bundle install --path vendor
deploy:
stage: deploy
script:
- bundle exec <your_script>
only:
- master # the job 'deploy' will affect only the 'master' branch
案例2:当您需要JS运行时
image: ruby:2.1
before_script:
- apt-get update -qy
- apt-get install -y nodejs
- bundle install --path vendor
cache:
paths:
- vendor/
deploy:
stage: deploy
script:
- bundle exec <your_script>
only:
- master # the job 'deploy' will affect only the 'master' branch
https://stackoverflow.com/questions/35514317
复制相似问题