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
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)
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)
Created by: vangie
Thank you for your reply, add
, :require => "omniauth-google-oauth2"
to Gemfile,the errorno 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)
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)
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)