我已经执行了 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:in
up'
最佳答案
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/