Build always fails

ruby

#1

Hey guys,

Our build has started failing for some reason and not sure about what the reason is.

We are using ruby-2.1.4 with postgres along with rails 4.0.13 on ubuntu, the specs are all passing locally.

However on ci, it fails on rake db:create db:schema:load command.

with the stack trace

export RAILS_ENV="test"
export RACK_ENV="test"
bundle exec rake db:create db:schema:load --trace
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'omniauth-linkedin'.
Gem Load Error is: undefined method `args' for OmniAuth::Strategies::OAuth:Class
Backtrace for gem load error is:
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:9:in `<class:OAuth>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:6:in `<module:Strategies>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:5:in `<module:OmniAuth>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:4:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-linkedin-0.2.0/lib/omniauth/strategies/linkedin.rb:1:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-linkedin-0.2.0/lib/omniauth-linkedin.rb:2:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in `require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `each'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `block in require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `each'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler.rb:108:in `require'
/home/ubuntu/treniq-site/config/application.rb:7:in `<top (required)>'
/home/ubuntu/treniq-site/Rakefile:4:in `require'
/home/ubuntu/treniq-site/Rakefile:4:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `load'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:27:in `run'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:360:in `exec'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:20:in `dispatch'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:10:in `start'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/exe/bundle:35:in `block in <top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/exe/bundle:27:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/bundle:23:in `load'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/bundle:23:in `<main>'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'
Bundler Error Backtrace:
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:85:in `rescue in block (2 levels) in require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:81:in `block (2 levels) in require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `each'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `block in require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `each'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler.rb:108:in `require'
/home/ubuntu/treniq-site/config/application.rb:7:in `<top (required)>'
/home/ubuntu/treniq-site/Rakefile:4:in `require'
/home/ubuntu/treniq-site/Rakefile:4:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `load'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:27:in `run'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:360:in `exec'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:20:in `dispatch'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:10:in `start'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/exe/bundle:35:in `block in <top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/exe/bundle:27:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/bundle:23:in `load'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/bundle:23:in `<main>'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'
NoMethodError: undefined method `args' for OmniAuth::Strategies::OAuth:Class
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:9:in `<class:OAuth>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:6:in `<module:Strategies>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:5:in `<module:OmniAuth>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-oauth-1.1.0/lib/omniauth/strategies/oauth.rb:4:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-linkedin-0.2.0/lib/omniauth/strategies/linkedin.rb:1:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `block in require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:214:in `load_dependency'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/activesupport-4.0.13/lib/active_support/dependencies.rb:229:in `require'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/omniauth-linkedin-0.2.0/lib/omniauth-linkedin.rb:2:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in `require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:82:in `block (2 levels) in require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `each'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:77:in `block in require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `each'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/runtime.rb:66:in `require'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler.rb:108:in `require'
/home/ubuntu/treniq-site/config/application.rb:7:in `<top (required)>'
/home/ubuntu/treniq-site/Rakefile:4:in `require'
/home/ubuntu/treniq-site/Rakefile:4:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/rake_module.rb:28:in `load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:689:in `raw_load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:94:in `block in load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:93:in `load_rakefile'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:77:in `block in run'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/bin/rake:23:in `load'
/home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0/bin/rake:23:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `load'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:74:in `kernel_load'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli/exec.rb:27:in `run'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:360:in `exec'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor.rb:369:in `dispatch'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:20:in `dispatch'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/vendor/thor/lib/thor/base.rb:444:in `start'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/cli.rb:10:in `start'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/exe/bundle:35:in `block in <top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/lib/bundler/friendly_errors.rb:121:in `with_friendly_errors'
/opt/circleci/.rvm/gems/ruby-2.1.4/gems/bundler-1.15.0/exe/bundle:27:in `<top (required)>'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/bundle:23:in `load'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/bundle:23:in `<main>'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `eval'
/opt/circleci/.rvm/gems/ruby-2.1.4/bin/ruby_executable_hooks:15:in `<main>'

export RAILS_ENV="test"
export RACK_ENV="test"
bundle exec rake db:create db:schema:load --trace
 returned exit code 1

Action failed: rake db:create db:schema:load

Any help would be great, Cheers


#2

You said you are using Ruby 2.1.4 but it looks like this gem is being pulled from /home/ubuntu/treniq-site/vendor/bundle/ruby/2.1.0 this might be your issue. Can you double check that the right version is being installed? It looks like its pulling it from your vendor directory, is this checked in to GitHub or being created during the build?


#3

I’m quite sure that we haven’t specified the ruby version as 2.1.0.
The circle.yml file has it specified as 2.1.4. So I’m not sure where this is coming from ?


#4

Are you checking your vendor/bundle into GitHub?


#5

Nope that’s a negative. We are not checking in vendor/bundle. Also I think it is generated by the bundle install command. I downgraded ubuntu to 12.04 on ci and it seems to be getting beyond the point of failure, the specs run but then it throws a ‘died unexpectedly’ error.


#6

Any ideas ?


#7

Anyone from CircleCI who can help us? We are on a paid version but it now fails continuously. Any suggestions will be appreciated.


#8

I’m having similar issues with the omniauth-cas gem. It started when bundler 1.15.0 was released. Locally, I’m having the same issues. If I use bundler 1.14.6, everything works fine. If I use bundler 1.15.0, I get an error when running ‘rails s’ and CI pukes as well. If anyone has any thoughts, I’d appreciate help as well!


#9