Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #1667

Closed
Open
Created 12 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

no such file to load -- omniauth/google/oauth2

Closed

no such file to load -- omniauth/google/oauth2

Created by: vangie

I was installing gitlabhq on CentOS 6.3 follow the document https://github.com/gitlabhq/gitlabhq/wiki/Install-(RedHat-CentOS-Fedora)

when I was on the step of bundle exec rake db:setup RAILS_ENV=production, get the following error,how can I fix it?

[root@test02 gitlabhq]# bundle exec rake db:setup RAILS_ENV=production
rake aborted!
no such file to load -- omniauth/google/oauth2

Linked issues
...

    Related merge requests

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: axilleas

      Try to run the previous command again

      sudo -u gitlab -H bundle install --without development test --deployment

      The gem should be named omniauth-google-oauth2 and not omniauth/google/oauth2.

      By Administrator on 2012-10-13T13:42:18 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: vangie

      I have run the command

      bundle install --without development test --deployment

      same error of bundle exec rake db:setup RAILS_ENV=production

      no such file to load -- omniauth/google/oauth2

      By Administrator on 2012-10-13T18:22:57 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: axilleas

      What if you install it manually?

      # gem install omniauth-google-oauth2 

      Also, I just realised that the document from which you are trying to install is almost 1 year old. Use the official documentation instead.

      By Administrator on 2012-10-13T22:12:26 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: zedtux

      sudo -u gitlab bundle exec gem list

      Returns:

      omniauth-google-oauth2 (0.1.13)

      It's installed (as it is defined in the Gemfile) but not loadable.

      Here is the tracktrace:

      zedtux@zedroot.org:/home/gitlab/gitlab$ sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production --trace
      rake aborted!
      cannot load such file -- omniauth/google/oauth2
      /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/runtime.rb:74:in `require'
      /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/runtime.rb:74:in `rescue in block in require'
      /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/runtime.rb:62:in `block in require'
      /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `each'
      /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/runtime.rb:55:in `require'
      /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler.rb:128:in `require'
      /home/gitlab/gitlab/config/application.rb:9:in `<top (required)>'
      /home/gitlab/gitlab/Rakefile:5:in `require'
      /home/gitlab/gitlab/Rakefile:5:in `<top (required)>'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/rake_module.rb:25:in `load_rakefile'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:501:in `raw_load_rakefile'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:82:in `block in load_rakefile'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:81:in `load_rakefile'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:65:in `block in run'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
      /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'

      Updating the Gemfile at line 21 (https://github.com/gitlabhq/gitlabhq/blob/master/Gemfile#L21) from:

      gem 'omniauth-google-oauth2'

      to:

      gem 'omniauth-google-oauth2', :require => "omniauth-google-oauth2"

      fix the issue, but have then the same issue but for openssl. But seems that my openssl error is due to my ruby compilation...

      Update I have recompiled my ruby and with the :require into the Gemfile it works.

      By Administrator on 2012-10-15T19:12:01 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: vangie

      Thank you for your reply, add , :require => "omniauth-google-oauth2" to Gemfile,the error no such file to load -- omniauth/google/oauth2 has gone,and meet the openssl issue, recomplie ruby can pass it.

      but as @axilleas said the doc is too old,I follow the latest doc https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md has installed sucess without preview issues.

      Thanks @axilleas @zedtux

      PS useradd on CentOS has a bit diff

      sudo adduser   \
          --system   \
          --shell /bin/sh   \
          --comment 'git version control' \
          --user-group\
          --home-dir /home/git \
           --create-home\
          git
      adduser --shell /sbin/nologin --comment 'gitlab system' gitlab

      By Administrator on 2012-10-23T07:04:54 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: axilleas

      This guide is more appropriate than the one you used. Just for reference...

      By Administrator on 2012-10-16T13:36:43 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: basepi

      @zedtux When you say you "recompiled ruby", did you do anything different than the first time? I recompiled ruby and ended up with the same error.

      I am on Ubuntu 12.04, following this guide: https://github.com/gitlabhq/gitlabhq/blob/stable/doc/install/installation.md

      I ran into the same cannot load such file -- omniauth/google/oauth2 error. Adding the :require to the Gemfile got rid of that error, but then I hit the same openssl error.

      Still have not been able to fix it. Any thoughts?

      By Administrator on 2013-01-18T01:50:49 (imported from GitLab project)

    • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
    Please register or sign in to reply
    0 Assignees
    Assign to
    Milestone
    No milestone
    None
    None
    Time tracking
    Due date
    None
    None
    0
    Labels
    None
    Assign labels
    • No matching results
    • Manage project labels
    Confidentiality
    Not confidential

    You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

    Lock issue
    Unlocked
    participants
    Reference: