Closed kaoru closed 7 years ago
Definition#specs_for
is considered a private API and its use outside of bundler itself is unsupported
Somebody tell that to AWS ElasticBeanstalk :disappointed: Is there a simple public-API-only way to write the /opt/elasticbeanstalk/support/scripts/check-for-gem.rb
script that they use?
#!/usr/bin/env /opt/rubies/ruby-current/bin/ruby
#==============================================================================
# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use
# this file except in compliance with the License. A copy of the License is
# located at
#
# https://aws.amazon.com/asl/
#
# or in the "license" file accompanying this file. This file is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or
# implied. See the License for the specific language governing permissions
# and limitations under the License.
#==============================================================================
require 'bundler'
Dir.chdir '/var/app/ondeck'
groups = Bundler.definition.groups
begin
Bundler.definition.resolve_with_cache!
rescue Bundler::GemNotFound
Bundler.definition(true).resolve_remotely!
end
gems = Bundler.definition.specs_for(groups).collect(&:name)
exit 0 if gems.include? ARGV[0]
Either way thanks for your response @segiddins!
Not that I can think of at the moment
Shame. Thanks for your help @segiddins, feel free to close this if it's not providing any benefit.
Will be interesting to see if Amazon Linux 2017.03 2.4.5 solves it somehow.
I'm experiencing this too. @kaoru did you find a workaround? [EDIT] I found that removing the .ebextensions/abc.config file I had put in place to facilitate deployment hid the error. I could at least redeploy my app. Perhaps it is due to AWS calling the rake statement I had placed in there that exposes this error. Anyway, may be useful for somebody else stumbling across this error.
I'm afraid not @philayres, for now I've just downgraded to Amazon Linux 2017.03 2.4.0 :-( Hoping Amazon releases a new version soon.
Sorry you're having the same issue, but at the same time somewhat glad to hear it's not just me :sweat_smile:
Hi @kaoru, this issue has been resolved in the newly released 2.5.0.
Release notes: https://aws.amazon.com/releasenotes/AWS-Elastic-Beanstalk/1578013167042124
Fantastic news, thanks for the heads up @lovesmall :grinning:
This is causing issues with AWS Elastic Beanstalk instances running Amazon Linux + Ruby + Puma. See my comment https://github.com/bundler/bundler/issues/5861#issuecomment-327929004 for more details on that.
This might also be relevant to https://github.com/bundler/bundler/issues/5865 if the problem there is BUNDLE_WITHOUT.
I've managed to reproduce the problem with a very small environment, which should isolate the bug and help to fix it:
Directory
.bundle/config
Gemfile
test.rb
Output with Bundler 1.15.4 (BAD)
Output with Bundler 1.12.1 (GOOD)