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

Bundler::GemfileNotFound with buildpack version 1.7.1 #86

Closed xtremerui closed 7 years ago

xtremerui 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": "https://support.run.pivotal.io",
   "version": 0,
   "description": "Cloud Foundry sponsored by Pivotal",
   "authorization_endpoint": "https://login.run.pivotal.io",
   "token_endpoint": "https://uaa.run.pivotal.io",
   "min_cli_version": "6.22.0",
   "min_recommended_cli_version": "latest",
   "api_version": "2.96.0",
   "app_ssh_endpoint": "ssh.run.pivotal.io:2222",
   "app_ssh_host_key_fingerprint": "e7:13:4e:32:ee:39:62:df:54:41:d7:f7:8b:b2:a7:6b",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.run.pivotal.io:443",
   "routing_endpoint": "https://api.run.pivotal.io/routing",
   "user": "043f9d52-d39d-4487-bdd2-be848c2bf407"
}
cf version 6.29.1+d5129d651.2017-08-17

This is PWS env info.

What version of the buildpack you are using? ruby-buildpack 1.7.1

If you were attempting to accomplish a task, what was it you were attempting to do? We are trying to deploy one of our ruby app on PWS.

What did you expect to happen? Deployment successfully

What was the actual behavior? Failed

Error log:

2017-09-20T10:28:23.35-0400 [API/2] OUT Created app with guid 24ede3e2-c65e-42bd-a507-f1e01ec34649
   2017-09-20T10:28:24.25-0400 [API/7] OUT Updated app with guid 24ede3e2-c65e-42bd-a507-f1e01ec34649 ({"route"=>"4d144f6f-dd65-45c6-a320-1186dc814e16", :verb=>"add", :relation=>"routes", :related_guid=>"4d144f6f-dd65-45c6-a320-1186dc814e16"})
   2017-09-20T10:28:26.63-0400 [API/0] OUT Uploading bits for app with guid 24ede3e2-c65e-42bd-a507-f1e01ec34649
   2017-09-20T10:28:37.86-0400 [API/2] OUT Creating build for app with guid 24ede3e2-c65e-42bd-a507-f1e01ec34649
   2017-09-20T10:28:39.18-0400 [API/2] OUT Updated app with guid 24ede3e2-c65e-42bd-a507-f1e01ec34649 ({"state"=>"STARTED"})
   2017-09-20T10:28:39.74-0400 [STG/0] OUT Downloading binary_buildpack...
   2017-09-20T10:28:39.74-0400 [STG/0] OUT Downloading staticfile_buildpack...
   2017-09-20T10:28:39.74-0400 [STG/0] OUT Downloading python_buildpack...
   2017-09-20T10:28:39.74-0400 [STG/0] OUT Downloading go_buildpack...
   2017-09-20T10:28:39.75-0400 [STG/0] OUT Downloading php_buildpack...
   2017-09-20T10:28:39.76-0400 [STG/0] OUT Downloaded binary_buildpack
   2017-09-20T10:28:39.76-0400 [STG/0] OUT Downloading dotnet_core_buildpack...
   2017-09-20T10:28:39.78-0400 [STG/0] OUT Downloaded python_buildpack
   2017-09-20T10:28:39.78-0400 [STG/0] OUT Downloading dotnet_core_buildpack_beta...
   2017-09-20T10:28:39.79-0400 [STG/0] OUT Downloaded staticfile_buildpack
   2017-09-20T10:28:39.79-0400 [STG/0] OUT Downloading java_buildpack...
   2017-09-20T10:28:39.80-0400 [STG/0] OUT Downloaded php_buildpack
   2017-09-20T10:28:39.80-0400 [STG/0] OUT Downloading ruby_buildpack...
   2017-09-20T10:28:39.81-0400 [STG/0] OUT Downloaded go_buildpack
   2017-09-20T10:28:39.81-0400 [STG/0] OUT Downloading nodejs_buildpack...
   2017-09-20T10:28:39.82-0400 [STG/0] OUT Downloaded nodejs_buildpack
   2017-09-20T10:28:39.82-0400 [STG/0] OUT Downloaded dotnet_core_buildpack_beta
   2017-09-20T10:28:39.82-0400 [STG/0] OUT Downloaded dotnet_core_buildpack
   2017-09-20T10:28:39.84-0400 [STG/0] OUT Downloaded java_buildpack
   2017-09-20T10:28:39.85-0400 [STG/0] OUT Downloaded ruby_buildpack
   2017-09-20T10:28:39.85-0400 [STG/0] OUT Creating container
   2017-09-20T10:28:40.44-0400 [STG/0] OUT Successfully created container
   2017-09-20T10:28:40.44-0400 [STG/0] OUT Downloading app package...
   2017-09-20T10:28:40.91-0400 [STG/0] OUT Downloaded app package (13.5M)
   2017-09-20T10:28:42.25-0400 [STG/0] OUT -----> Ruby Buildpack version 1.7.1
   2017-09-20T10:28:42.25-0400 [STG/0] OUT -----> Supplying Ruby
   2017-09-20T10:28:42.31-0400 [STG/0] OUT -----> Installing bundler 1.15.4
   2017-09-20T10:28:42.31-0400 [STG/0] OUT        Copy [/tmp/buildpacks/85ad020e4f264b1db9b5312baef54d43/dependencies/530b8129893066f29b08db0722619964/bundler-1.15.4-e083af6d.tgz]
   2017-09-20T10:28:42.72-0400 [STG/0] OUT -----> Installing ruby 2.3.5
   2017-09-20T10:28:42.72-0400 [STG/0] OUT        Copy [/tmp/buildpacks/85ad020e4f264b1db9b5312baef54d43/dependencies/a89757b9213e29fb6b95bb26bc56c0fb/ruby-2.3.5-linux-x64-5634abe2.tgz]
   2017-09-20T10:28:44.57-0400 [STG/0] OUT -----> Update rubygems from 2.5.2.1 to 2.6.13
   2017-09-20T10:28:44.57-0400 [STG/0] OUT -----> Installing rubygems 2.6.13
   2017-09-20T10:28:44.57-0400 [STG/0] OUT        Copy [/tmp/buildpacks/85ad020e4f264b1db9b5312baef54d43/dependencies/7576c6d022d2fb0b6c63e3ba0c037f36/rubygems-2.6.13.tgz]
   2017-09-20T10:28:50.89-0400 [STG/0] OUT        **WARNING** You have the `.bundle/config` file checked into your repository
   2017-09-20T10:28:50.89-0400 [STG/0] OUT        It contains local state like the location of the installed bundle
   2017-09-20T10:28:50.89-0400 [STG/0] OUT        as well as configured git local gems, and other settings that should
   2017-09-20T10:28:50.89-0400 [STG/0] OUT        not be shared between multiple checkouts of a single repo. Please
   2017-09-20T10:28:50.89-0400 [STG/0] OUT        remove the `.bundle/` folder from your repo and add it to your `.gitignore` file.
   2017-09-20T10:28:51.01-0400 [STG/0] OUT -----> Installing dependencies using bundler 1.15.4
   2017-09-20T10:28:51.01-0400 [STG/0] OUT        Running: bundle install --without development:test --jobs=4 --retry=4 --path /tmp/contents966134578/deps/0/vendor_bundle --binstubs /tmp/contents966134578/deps/0/binstubs --deployment
   2017-09-20T10:28:51.88-0400 [STG/0] OUT        Installing backports 3.8.0
   2017-09-20T10:28:51.88-0400 [STG/0] OUT        Using bundler 1.15.4
   2017-09-20T10:28:51.88-0400 [STG/0] OUT        Installing concurrent-ruby 1.0.5
   2017-09-20T10:28:51.89-0400 [STG/0] OUT        Installing connection_pool 2.2.1
   2017-09-20T10:28:51.97-0400 [STG/0] OUT        Installing thor 0.19.4
   2017-09-20T10:28:52.03-0400 [STG/0] OUT        Installing hiredis 0.6.1 with native extensions
   2017-09-20T10:28:52.06-0400 [STG/0] OUT        Installing multi_json 1.12.1
   2017-09-20T10:28:54.52-0400 [STG/0] OUT        Installing mustermann 1.0.1
   2017-09-20T10:28:54.52-0400 [STG/0] OUT        Installing puma 3.10.0 with native extensions
   2017-09-20T10:28:54.53-0400 [STG/0] OUT        Installing rack 2.0.3
   2017-09-20T10:28:54.59-0400 [STG/0] OUT        Installing redis 3.3.3
   2017-09-20T10:28:56.08-0400 [STG/0] OUT        Installing tilt 2.0.8
   2017-09-20T10:28:56.08-0400 [STG/0] OUT        Installing foreman 0.84.0
   2017-09-20T10:28:56.08-0400 [STG/0] OUT        Installing redis-namespace 1.5.3
   2017-09-20T10:28:56.10-0400 [STG/0] OUT        Installing rack-protection 2.0.0
   2017-09-20T10:28:56.16-0400 [STG/0] OUT        Installing sidekiq 5.0.4
   2017-09-20T10:28:56.20-0400 [STG/0] OUT        Installing sinatra 2.0.0
   2017-09-20T10:28:56.27-0400 [STG/0] OUT        Installing sinatra-contrib 2.0.0
   2017-09-20T10:28:56.31-0400 [STG/0] OUT        Bundle complete! 14 Gemfile dependencies, 18 gems now installed.
   2017-09-20T10:28:56.31-0400 [STG/0] OUT        Gems in the groups development and test were not installed.
   2017-09-20T10:28:56.31-0400 [STG/0] OUT        Bundled gems are installed into /tmp/contents966134578/deps/0/vendor_bundle.
   2017-09-20T10:28:56.31-0400 [STG/0] OUT        Cleaning up the bundler cache.
   2017-09-20T10:28:56.72-0400 [STG/0] OUT -----> Creating runtime environment
   2017-09-20T10:28:56.85-0400 [STG/0] OUT -----> Saving vendor_bundle to cache
   2017-09-20T10:28:57.04-0400 [STG/0] OUT -----> Finalizing Ruby
   2017-09-20T10:28:57.19-0400 [STG/0] OUT -----> Writing config/database.yml to read from DATABASE_URL
   2017-09-20T10:28:57.43-0400 [STG/0] OUT -----> Copy binaries to app/bin directory
   2017-09-20T10:29:02.47-0400 [STG/0] OUT Exit status 0
   2017-09-20T10:29:02.47-0400 [STG/0] OUT Uploading droplet, build artifacts cache...
   2017-09-20T10:29:02.47-0400 [STG/0] OUT Uploading build artifacts cache...
   2017-09-20T10:29:02.47-0400 [STG/0] OUT Uploading droplet...
   2017-09-20T10:29:02.62-0400 [STG/0] OUT Uploaded build artifacts cache (3.9M)
   2017-09-20T10:29:03.25-0400 [API/3] OUT Creating droplet for app with guid 24ede3e2-c65e-42bd-a507-f1e01ec34649
   2017-09-20T10:29:06.43-0400 [STG/0] OUT Uploaded droplet (35.6M)
   2017-09-20T10:29:06.44-0400 [STG/0] OUT Uploading complete
   2017-09-20T10:29:06.46-0400 [STG/0] OUT Stopping instance 3ba83b0b-98ff-49a0-a2d4-e387ced57591
   2017-09-20T10:29:06.46-0400 [STG/0] OUT Destroying container
   2017-09-20T10:29:07.12-0400 [STG/0] OUT Successfully destroyed container
   2017-09-20T10:29:07.32-0400 [CELL/1] OUT Creating container
   2017-09-20T10:29:07.32-0400 [CELL/0] OUT Creating container
   2017-09-20T10:29:07.81-0400 [CELL/1] OUT Successfully created container
   2017-09-20T10:29:07.88-0400 [CELL/0] OUT Successfully created container
   2017-09-20T10:29:09.93-0400 [CELL/0] OUT Starting health monitoring of container
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR /home/vcap/deps/0/bundler/gems/bundler-1.15.4/lib/bundler/definition.rb:31:in `build': /home/app605437742/app/Gemfile not found (Bundler::GemfileNotFound)
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR     from /home/vcap/deps/0/bundler/gems/bundler-1.15.4/lib/bundler.rb:129:in `definition'
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR     from /home/vcap/deps/0/bundler/gems/bundler-1.15.4/lib/bundler.rb:95:in `setup'
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR     from /home/vcap/deps/0/bundler/gems/bundler-1.15.4/lib/bundler/setup.rb:19:in `<top (required)>'
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR     from /home/vcap/deps/0/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `require'
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR     from /home/vcap/deps/0/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR     from /home/vcap/deps/0/ruby/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
   2017-09-20T10:29:10.34-0400 [APP/PROC/WEB/0] ERR     from /home/vcap/deps/0/bin/foreman:15:in `<main>'
   2017-09-20T10:29:10.35-0400 [APP/PROC/WEB/0] OUT Exit status 1
   2017-09-20T10:29:10.35-0400 [CELL/SSHD/0] OUT Exit status 0
   2017-09-20T10:29:10.84-0400 [CELL/1] OUT Starting health monitoring of container

Our app used work in ruby-buildpack version 1.6.47 and there is no change since then. We are seeing this error now after PWS bump their ruby-buildpack version to 1.7.1

cf-gitbot commented 7 years ago

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

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

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

dgodd commented 7 years ago

@xtremerui Are you able to provide extra info? For instance a paired down sample app which fails?

xtremerui commented 7 years ago

@dgodd are posting Gemfile and Gemfile.lock here good enough? If not we can DM you the production app on Slack.

sclevine commented 7 years ago

Thanks for the report @xtremerui. We identified the issue and fixed it in 1.7.2.