cloudfoundry / ruby-buildpack

Cloud Foundry buildpack for Ruby, Sinatra and Rails
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
65 stars 160 forks source link

On CAT tests "NameError: uninitialized constant Bundler::RubyGemsGemInstaller" #83

Closed rauizab closed 7 years ago

rauizab commented 7 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

{
   "name": "",
   "build": "",
   "support": "",
   "version": 0,
   "description": "",
   "authorization_endpoint": "https://login.l***",
   "token_endpoint": "https://uaa.***",
   "min_cli_version": null,
   "min_recommended_cli_version": null,
   "api_version": "2.85.0",
   "app_ssh_endpoint": "ssh.****:2222",
   "app_ssh_host_key_fingerprint": "****",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.***:4443",
   "routing_endpoint": "https://api.***/routing"
}

What version of the buildpack you are using? 1.6.41

If you were attempting to accomplish a task, what was it you were attempting to do? CAT tests running against our CF instance.

Please confirm where necessary:

2017-07-05T07:31:32.99+0000 [STG/0] OUT Downloaded app package (1.2M)
2017-07-05T07:31:32.99+0000 [STG/0] OUT Staging...
2017-07-05T07:31:33.79+0000 [STG/0] OUT -------> Buildpack version 1.6.41
2017-07-05T07:31:34.49+0000 [STG/0] OUT        Downloaded [https://buildpacks.cloudfoundry.org/dependencies/bundler/bundler-1.15.1-2803ca8e.tgz]
2017-07-05T07:31:34.67+0000 [STG/0] OUT -----> Supplying Ruby/Rack
2017-07-05T07:31:36.40+0000 [STG/0] OUT        Downloaded [https://buildpacks.cloudfoundry.org/dependencies/ruby/ruby-2.4.1-linux-x64-9e451858.tgz]
2017-07-05T07:31:37.32+0000 [STG/0] OUT -----> Using Ruby version: ruby-2.4.1
2017-07-05T07:31:38.20+0000 [STG/0] OUT -------> Buildpack version 1.6.41
2017-07-05T07:31:38.52+0000 [STG/0] OUT -----> Finalizing Ruby/Rack
2017-07-05T07:31:38.69+0000 [STG/0] OUT -----> Installing dependencies using bundler 1.15.1
2017-07-05T07:31:38.90+0000 [STG/0] OUT        Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --jobs=4 --retry=4 --deployment
2017-07-05T07:31:39.65+0000 [STG/0] OUT        Installing mustermann 1.0.0
2017-07-05T07:31:39.65+0000 [STG/0] OUT        Installing rack 2.0.3
2017-07-05T07:31:39.65+0000 [STG/0] OUT        Installing tilt 2.0.7
2017-07-05T07:31:39.65+0000 [STG/0] OUT        Installing json 2.1.0 with native extensions
2017-07-05T07:31:39.65+0000 [STG/0] OUT        Using bundler 1.15.1
2017-07-05T07:31:40.02+0000 [STG/0] OUT        NameError: uninitialized constant Bundler::RubyGemsGemInstaller
2017-07-05T07:31:40.02+0000 [STG/0] OUT        An error occurred while installing rack (2.0.3), and Bundler cannot continue.
2017-07-05T07:31:40.02+0000 [STG/0] OUT        Make sure that `gem install rack -v '2.0.3'` succeeds before bundling.
2017-07-05T07:31:40.02+0000 [STG/0] OUT        In Gemfile:
2017-07-05T07:31:40.02+0000 [STG/0] OUT        sinatra was resolved to 2.0.0, which depends on
2017-07-05T07:31:40.02+0000 [STG/0] OUT        rack-protection was resolved to 2.0.0, which depends on
2017-07-05T07:31:40.02+0000 [STG/0] OUT        rack
2017-07-05T07:31:40.04+0000 [STG/0] OUT        Bundler Output: Installing mustermann 1.0.0
2017-07-05T07:31:40.04+0000 [STG/0] OUT        Installing rack 2.0.3
2017-07-05T07:31:40.04+0000 [STG/0] OUT        Installing tilt 2.0.7
2017-07-05T07:31:40.04+0000 [STG/0] OUT        Installing json 2.1.0 with native extensions
2017-07-05T07:31:40.04+0000 [STG/0] OUT        Using bundler 1.15.1
2017-07-05T07:31:40.04+0000 [STG/0] OUT        NameError: uninitialized constant Bundler::RubyGemsGemInstaller
2017-07-05T07:31:40.04+0000 [STG/0] OUT        An error occurred while installing rack (2.0.3), and Bundler cannot continue.
2017-07-05T07:31:40.04+0000 [STG/0] OUT        Make sure that `gem install rack -v '2.0.3'` succeeds before bundling.
2017-07-05T07:31:40.04+0000 [STG/0] OUT        
2017-07-05T07:31:40.04+0000 [STG/0] OUT        In Gemfile:
2017-07-05T07:31:40.04+0000 [STG/0] OUT        sinatra was resolved to 2.0.0, which depends on
2017-07-05T07:31:40.04+0000 [STG/0] OUT        rack-protection was resolved to 2.0.0, which depends on
2017-07-05T07:31:40.04+0000 [STG/0] OUT        rack
2017-07-05T07:31:40.05+0000 [STG/0] OUT  !
2017-07-05T07:31:40.06+0000 [STG/0] OUT  !     Failed to install gems via Bundler.
2017-07-05T07:31:40.06+0000 [STG/0] OUT  !
2017-07-05T07:31:40.07+0000 [STG/0] ERR Failed to compile droplet
2017-07-05T07:31:40.14+0000 [STG/0] OUT Exit status 223
2017-07-05T07:31:40.14+0000 [STG/0] ERR Staging failed: Exited with status 223
2017-07-05T07:31:40.16+0000 [STG/0] OUT Destroying container
2017-07-05T07:31:40.67+0000 [STG/0] OUT Successfully destroyed container

[2017-07-05 07:31:43.49 (UTC)]> cf delete CATS-6-APP-ec711829-8e11-4cbc-4 -f -r 
Deleting app CATS-6-APP-ec711829-8e11-4cbc-4 in org CATS-6-ORG-1e9b1898-d17a-4628-7 / space CATS-6-SPACE-63a71557-ca47-4b60-7 as CATS-USER-6-2017_07_05-07h28m46.659s...
OK

• Failure in Spec Setup (BeforeEach) [26.485 seconds]
[tasks] v3 tasks
/go/src/github.com/cloudfoundry/cf-acceptance-tests/cats_suite_helpers/cats_suite_helpers.go:207
  tasks lifecycle [BeforeEach]
  /go/src/github.com/cloudfoundry/cf-acceptance-tests/tasks/task.go:137
    can successfully create and run a task
    /go/src/github.com/cloudfoundry/cf-acceptance-tests/tasks/task.go:136

    Expected
        <int>: 1
    to match exit code:
        <int>: 0

    /go/src/github.com/cloudfoundry/cf-acceptance-tests/tasks/task.go:81
cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/148322835

The labels on this github issue will be updated when the story is started.

rauizab commented 7 years ago

Duplicate of https://github.com/cloudfoundry/ruby-buildpack/issues/72

sclevine commented 7 years ago

We've investigated this error several times. One investigation was led by a core bundler contributor. It happens inconsistently, and appears to be related to network flakiness that results in a confusing error message due to bundler's use of autoload.

Can you demonstrate this behavior with an app that has vendored gems, or propose a change (either upstream or in the buildpack) that addresses this issue?

rauizab commented 7 years ago

I dont have the knowledge to propose an improvement. I was testing the CATS and I wanted to give feedback and have an explanation why it is so. We have just started using the CATS and we were not sure if the problem was on our side (CATS configuration) or it was due to another reason. As it seems a connection issue I can close this ticket.

sclevine commented 7 years ago

Regardless, thanks for the report! I'll update this issue if we are able to fix or work around the issue.