gitlab install fails on missing gem file

Asked by Olli-Pekka Wallin on 2016-04-23

sudo apt-get install gitlab

fails with missing gemfile :

Verifying we have all required libraries...
Could not find gem 'devise-two-factor (~> 2.0.0)' in any of the gem sources
listed in your Gemfile or available on this machine.
dpkg: error processing package gitlab (--configure):
 subprocess installed post-installation script returned error exit status 7
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Errors were encountered while processing:
 gitlab
E: Sub-process /usr/bin/dpkg returned an error code (1)

How to fix it ? Where is the Gemfile ?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gitlab Edit question
Assignee:
No assignee Edit question
Last query:
2016-04-23
Last reply:
2016-05-01
Olli-Pekka Wallin (hozmaster) said : #1

Server :

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial

Server installation

I suggest you report a bug

Please send us the full Terminal output of this command:

sudo apt-get install ruby-devise-two-factor ; apt-cache policy ruby-devise-two-factor

Does this install command solve the issue?

Olli-Pekka Wallin (hozmaster) said : #4

root@main:~# apt-cache policy ruby-devise-two-factor
ruby-devise-two-factor:
  Installed: 2.0.0-1
  Candidate: 2.0.0-1
  Version table:
 *** 2.0.0-1 500
        500 http://fi.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        500 http://fi.archive.ubuntu.com/ubuntu xenial/universe i386 Packages
        100 /var/lib/dpkg/status

and

sudo apt-get install ruby-devise-two-factor
Reading package lists... Done
Building dependency tree
Reading state information... Done
ruby-devise-two-factor is already the newest version (2.0.0-1).

Then I also suggest reporting a bug.

Olli-Pekka Wallin (hozmaster) said : #6

After some sudo fu:

I've change database adapter to mysql (postgresql refuse to work?)
I did go to /usr/share/gitlab and I type bundle install, gem install rugged -v '0.23.3', sudo apt-get install cmake pkg-config bundle install etc some times ...

sudo apt-get install gitlab says now :

Using devise-two-factor 2.0.1
Bundle complete! 121 Gemfile dependencies, 264 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Running final rake tasks and tweaks...
Initializing database...
fatal: Not a git repository (or any of the parent directories): .git
D, [2016-04-25T00:01:52.663635 #15925] DEBUG -- : ** [Raven] Event not sent due to excluded environment: production
rake aborted!
Gem::LoadError: Specified 'mysql' for database adapter, but the gem is not loaded. Add `gem 'mysql'` 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: mysql is not part of the bundle. Add it to Gemfile.
/var/lib/gems/2.3.0/gems/bundler-1.11.2/lib/bundler/rubygems_integration.rb:304:in `block in replace_gem'
/usr/share/gitlab/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:schema:load => environment
(See full trace by running task with --trace)
dpkg: error processing package gitlab (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 gitlab
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hopefulle there is hope will work with Apache ... :|

UnAfraid (unafraid89) said : #7

I fixed it using bundle
# (Make sure u've installed libmysqlclient-dev, pkg-config, cmake)
$ cd /usr/share/gitlab
$ bundle
$ service nginx start # for some reason it didn't started it after ssl certificate retrieval
$ apt-get install

Can you help with this problem?

Provide an answer of your own, or ask Olli-Pekka Wallin for more information if necessary.

To post a message you must log in.