On 09/02/18 09:32, Pirate Praveen wrote: > On വ്യാഴം 08 ഫെബ്രുവരി 2018 10:06 വൈകു, Leopold Palomo-Avellaneda wrote: >> Please, could you give me some workaround to solve this issue? > > You will need to set environment variable DB. See > https://salsa.debian.org/ruby-team/gitlab/raw/debian/8.13.11+dfsg1-8/debian/README.Debian > >
Running this: runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && rake gitlab:check RAILS_ENV=production' I got this: D, [2018-02-09T10:54:56.488801 #1412] DEBUG -- sentry: ** [Raven] Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). excluded from capture due to environment or should_capture callback rake aborted! Gem::LoadError: Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). /usr/share/gitlab/config/environment.rb:5:in `<top (required)>' Gem::LoadError: pg is not part of the bundle. Add it to Gemfile. /usr/share/gitlab/config/environment.rb:5:in `<top (required)>' Tasks: TOP => gitlab:check => gitlab:gitlab_shell:check => environment (See full trace by running task with --trace) But, if I run this: runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB=all RAILS_ENV && rake gitlab:check RAILS_ENV=production' if works. Checking the Gemfile this part is problematic: # Supported DBs ENV["DB"] ||= "mysql" gem "mysql2", '~> 0.3.16' if ENV["DB"] == "all" || ENV["DB"] == "mysql" gem "pg", '~> 0.18.2' if ENV["DB"] == "all" || ENV["DB"] == "postgres" changing this: -ENV["DB"] ||= "mysql" +ENV["DB"] ||= "all" work is all cases. I don't have sufficient knowledge to see if this is a bug or error from my own, but there's something wrong here. Leopold -- -- Linux User 152692 GPG: 05F4A7A949A2D9AA Catalonia ------------------------------------- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?
signature.asc
Description: OpenPGP digital signature