ruby-on-rails - 此版本的 GitLab 依赖于 gitlab-shell 2.6.3,但您运行的是未知。请更新 gitlab-shell

标签 ruby-on-rails bundler gitlab

我已经执行了 git clone https://github.com/gitlabhq/gitlabhq.git并执行了bundle install。然后我在Ubuntu中执行了bundle exec rake db:migrate。

我收到这个警告

~/Siva/Clone/gitlabhq$ bundle 执行 rake db:migrate

警告:此版本的 GitLab 依赖于 gitlab-shell 2.6.3,但您正在运行未知。请更新 gitlab-shell。

20141121133009 AddTimestampsToMembers:正在迁移execute("UPDATE Members SETcreated_at = now() WHEREcreated_at is NULL")

rake 中止!

StandardError:发生错误,此迁移和所有后续迁移均已取消:

SQLite3::SQLException:没有这样的函数:现在:更新成员 SETcreated_at = now() WHEREcreated_at 为 NULL/home/siva/Siva/Clone/gitlabhq/db/migrate/20141121133009_add_timestamps_to_members.rb:8:in 向上' ActiveRecord::StatementInvalid: SQLite3::SQLException: 没有这样的函数: now: UPDATE 成员 SETcreated_at = now() WHEREcreated_at 为 NULL /home/siva/Siva/Clone/gitlabhq/db/migrate/20141121133009_add_timestamps_to_members.rb:8:inup'

最佳答案

GitLab 尝试解析 config/initializers/5_backend.rb 中的 GitLab Shell 版本

current_version = Gitlab::VersionInfo.parse(Gitlab::Shell.new.version)

这取决于您尝试升级的 GitLab 版本:

  • 检查您当前的版本:

    cd /home/git/gitlab
    sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
    sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
    
  • 仔细检查From 6.x or 7.x to 7.12 (特别是像 Ruby version 这样的点)。

关于ruby-on-rails - 此版本的 GitLab 依赖于 gitlab-shell 2.6.3,但您运行的是未知。请更新 gitlab-shell,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31285098/

相关文章:

Gitlab推力被拒绝

ruby-on-rails - 为什么每次使用 rvm 在 rails 3.2.1 中重启后都需要 "bundle install"?

linux - sed 命令在 gitlab runner 上无法正确执行

ruby-on-rails - Ruby on Rails "invalid byte sequence in UTF-8"由于机器人

ruby-on-rails - 如何使用 Mongoid 或 Mongo Ruby 驱动程序从 Ruby 代码获取 MongoDB 版本?

ruby-on-rails - rails 3.1:应用程序如何为 ActiveRecord::RecordInvalid 处理不同的 'reasons'(例如,重复与验证错误)

ruby-on-rails - 如何将参数传递给Rails中的委托(delegate)方法

Ruby bundle 打开,设置 $EDITOR

Ruby 打包器生成二进制文件

Gitlab protected 分支不保护 ssh 推送上的分支