2

I have perfomed git clone https://github.com/gitlabhq/gitlabhq.git and executed bundle install.Then I executed bundle exec rake db:migrate in Ubuntu.

I got this warning

~/Siva/Clone/gitlabhq$ bundle exec rake db:migrate

WARNING: This version of GitLab depends on gitlab-shell 2.6.3, but you're running Unknown. Please update gitlab-shell.

20141121133009 AddTimestampsToMembers: migrating execute("UPDATE members SET created_at = now() WHERE created_at is NULL")

rake aborted!

StandardError: An error has occurred, this and all later migrations canceled:

SQLite3::SQLException: no such function: now: UPDATE members SET created_at = now() WHERE created_at is NULL/home/siva/Siva/Clone/gitlabhq/db/migrate/20141121133009_add_timestamps_to_members.rb:8:in up' ActiveRecord::StatementInvalid: SQLite3::SQLException: no such function: now: UPDATE members SET created_at = now() WHERE created_at is NULL /home/siva/Siva/Clone/gitlabhq/db/migrate/20141121133009_add_timestamps_to_members.rb:8:inup'

Sivakumar K
  • 131
  • 1
  • 2
  • 9

2 Answers2

2

GitLab tries to parse the GitLab Shell version in config/initializers/5_backend.rb

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

It depends on which version of GitLab you are trying to upgrade from:

  • check your current version:

    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
    
  • double-check From 6.x or 7.x to 7.12 (especially points like Ruby version).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
1

The actual error doesn't stem from the gitlab shell warning but from the SQLite database you are apparently using.

Unfortunately, Gitlab doesn't support sqlite so you will have to use either MySQL or PostgreSQL as your database. More details can be found in Gitlab's installation guide at https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md#4-database

Holger Just
  • 52,918
  • 14
  • 115
  • 123