[SOLVED] OmniAuth rake Error when Installing GitLab Shell

When try to install the latest GitLab:

root@gitlabtest-debian-vm2:/home/git/gitlab# sudo -u git -H bundle exec rake --trace gitlab:shell:install[v2.4.0] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production
rake aborted!
NameError: uninitialized constant OmniAuth::Strategy
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth2-1.1.1/lib/omniauth/strategies/oauth2.rb:16:in `<class:OAuth2>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth2-1.1.1/lib/omniauth/strategies/oauth2.rb:15:in `<module:Strategies>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth2-1.1.1/lib/omniauth/strategies/oauth2.rb:9:in `<module:OmniAuth>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth2-1.1.1/lib/omniauth/strategies/oauth2.rb:8:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/omniauth-google-oauth2-0.2.5/lib/omniauth/strategies/google_oauth2.rb:1:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/omniauth-google-oauth2-0.2.5/lib/omniauth/google_oauth2.rb:1:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/omniauth-google-oauth2-0.2.5/lib/omniauth-google-oauth2.rb:1:in `<top (required)>'
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `require'
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `each'
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler/runtime.rb:61:in `require'
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.7.12/lib/bundler.rb:134:in `require'
/home/git/gitlab/config/application.rb:6:in `<top (required)>'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:687:in `raw_load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:93:in `load_rakefile'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:77:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/lib/rake/application.rb:75:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rake-10.3.2/bin/rake:33:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<main>'

I have little to no experience with Ruby.

Up to this point, the manual install has run smoothly. I originally tried the automated install, but I ran into lots of problems (there wasn’t a git user nor init.d service yet it said it completed with no errors).

I added --trace to the command from here.

I originally posted this on GitHub, but then I saw how many issues had zero replies and realized that I probably wasn’t going to get help very quickly there.

Debian 7.8 x64

This may or may not help with your particular issue, but I recommend using su -l git to open a login shell as the GitLab user, and then run commands without having to prefix with sudo. I’ve found this helps take care of environment issues, which may be what you’re running into, especially if you’re using rbenv or anything (you’re not, so I digress).

You said there wasn’t a git user; there won’t be a git user until you make one unless you’re using the omnibus package or something. How are you trying to do the install?

1 Like

I meant that there wasn’t git user created nor an init.d service when using the Omnibus package. It also gave a 50x (I forget…either 500 or 502) after a restart. I found that extremely annoying (what kind of background job or server runs without its own user and service?) so I am trying to install it manually.

Can I use su -l git? I would have to reset the git user’s password in order to use sudo from it (I don’t know what it is), but I’m not sure if that would effect gitlab.

If there is another third party package that will install a service and user, that would be good too. I’m doing this in a VM to experiment with Gitlab and try it out, so I can refresh it any time (I :gift_heart: Virtualbox Snapshots). I can just revert to a fresh Debian install in seconds.

Ah, then that would be a bug as the omnibus package should both create a user and a service, at least it did on CentOS 7 when I installed it.

If you’re root, you can use su -l git else you can sudo su -l git without the user having a password.

It does appear that Debian 7 is supported, and the installation should be really straightforward. You followed the steps here for Debian right? I would try again on a fresh VM to see if you can reproduce this error.

1 Like

Well I started over and what do you know: It works perfectly! I must have made an error or skipped a step somewhere when copying and pasting commands. Once I install GitLab, CI I’ll have a full server to play with.