Gitaly fails to install locally sometimes
In some circumstances, it seems Gitaly cannot be installed. The stack trace is as follows:
› bin/rspec spec/services/notification_service_spec.rb
Running via Spring preloader in process 8903
Gitlab::TaskFailedError: cd ruby && bundle install
/Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find memoist-0.16.0 in any of the sources (Bundler::GemNotFound)
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/spec_set.rb:81:in `map!'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/spec_set.rb:81:in `materialize'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/definition.rb:159:in `specs'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/definition.rb:218:in `specs_for'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/definition.rb:207:in `requested_specs'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/runtime.rb:109:in `block in definition_method'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/runtime.rb:21:in `setup'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler.rb:101:in `setup'
from /Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler/setup.rb:19:in `<top (required)>'
from /Users/remy/.rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/remy/.rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
make: *** [.ruby-bundle] Error 1
/Users/remy/Code/GitLab/gdk/gitlab/lib/tasks/gitlab/task_helpers.rb:84:in `run_command!'
/Users/remy/Code/GitLab/gdk/gitlab/lib/tasks/gitlab/gitaly.rake:25:in `block (5 levels) in <top (required)>'
/Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler.rb:283:in `block in with_original_env'
/Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler.rb:528:in `with_env'
/Users/remy/.gem/ruby/2.3.3/gems/bundler-1.15.3/lib/bundler.rb:283:in `with_original_env'
/Users/remy/Code/GitLab/gdk/gitlab/lib/tasks/gitlab/gitaly.rake:25:in `block (4 levels) in <top (required)>'
/Users/remy/Code/GitLab/gdk/gitlab/lib/tasks/gitlab/gitaly.rake:20:in `chdir'
/Users/remy/Code/GitLab/gdk/gitlab/lib/tasks/gitlab/gitaly.rake:20:in `block (3 levels) in <top (required)>'
Tasks: TOP => gitlab:gitaly:install
/Users/remy/Code/GitLab/gdk/gitlab/spec/support/test_env.rb:142:in `setup_gitaly': Can't clone gitaly (RuntimeError)
from /Users/remy/Code/GitLab/gdk/gitlab/spec/support/test_env.rb:74:in `init'
from /Users/remy/Code/GitLab/gdk/gitlab/spec/spec_helper.rb:73:in `block (2 levels) in <top (required)>'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/example.rb:441:in `instance_exec'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/example.rb:441:in `instance_exec'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/hooks.rb:350:in `run'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1880:in `block in run_hooks_with'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1880:in `each'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1880:in `run_hooks_with'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/configuration.rb:1836:in `with_suite_hooks'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:112:in `block in run_specs'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/reporter.rb:77:in `report'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:111:in `run_specs'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:87:in `run'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:71:in `run'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/lib/rspec/core/runner.rb:45:in `invoke'
from /Users/remy/.gem/ruby/2.3.3/gems/rspec-core-3.5.0/exe/rspec:4:in `<top (required)>'
from /Users/remy/.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
from /Users/remy/.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `block in load'
from /Users/remy/.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
from /Users/remy/.gem/ruby/2.3.3/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
from /Users/remy/.gem/ruby/2.3.3/gems/spring-commands-rspec-1.0.4/lib/spring/commands/rspec.rb:18:in `call'
from /Users/remy/.rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/remy/.rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Weirdly, running the Rake task manually works fine:
› bin/rake 'gitlab:gitaly:install[tmp/tests/gitaly]'
Running via Spring preloader in process 8993