-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
stage/needs-triageAutomatically applied to new issues and PRs, indicating they haven't been looked at.Automatically applied to new issues and PRs, indicating they haven't been looked at.
Description
Description:
When trying to build a ruby application that uses bundler 4.0+, the following error appears:
sam build --use-container --config-env staging --debug
2025-12-15 17:59:11,148 | Config file location: /XXXX/samconfig.toml
2025-12-15 17:59:11,150 | Loading configuration values from [staging.['build'].parameters]
(env.command_name.section) in config file at '/XXXX/samconfig.toml'...
2025-12-15 17:59:11,150 | Configuration values successfully loaded.
2025-12-15 17:59:11,150 | Configuration values are: {'stack_name': 'XXXX', 'cached': True,
'parallel': True}
2025-12-15 17:59:11,167 | Using SAM Template at /XXXX/template.yaml
2025-12-15 17:59:11,182 | Using config file: samconfig.toml, config environment: staging
2025-12-15 17:59:11,182 | Expand command line arguments to:
2025-12-15 17:59:11,182 | --template_file=/XXXX/template.yaml
--use_container --parallel --mount_with=READ --build_dir=.aws-sam/build --cache_dir=.aws-sam/cache --cached
2025-12-15 17:59:11,197 | 'build' command is called
2025-12-15 17:59:11,197 | Starting Build use cache
2025-12-15 17:59:11,197 | Starting Build inside a container
2025-12-15 17:59:11,215 | Collected default values for parameters: <REDACTED>
2025-12-15 17:59:11,229 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,229 | There is no customer defined id or cdk path defined for resource REDACTED, so we
will use the resource logical id as the resource id
2025-12-15 17:59:11,230 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,230 | There is no customer defined id or cdk path defined for resource REDACTED, so
we will use the resource logical id as the resource id
2025-12-15 17:59:11,230 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,231 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,231 | There is no customer defined id or cdk path defined for resource REDACTED, so
we will use the resource logical id as the resource id
2025-12-15 17:59:11,232 | There is no customer defined id or cdk path defined for resource REDACTED, so we will
use the resource logical id as the resource id
2025-12-15 17:59:11,232 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,232 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,233 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,233 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,233 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,234 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,234 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,234 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,235 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,235 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,235 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,236 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,236 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,237 | There is no customer defined id or cdk path defined for resource REDACTED, so we
will use the resource logical id as the resource id
2025-12-15 17:59:11,237 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,239 | 0 stacks found in the template
2025-12-15 17:59:11,239 | Collected default values for parameters: REDACTED
2025-12-15 17:59:11,252 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,252 | There is no customer defined id or cdk path defined for resource REDACTED, so we
will use the resource logical id as the resource id
2025-12-15 17:59:11,253 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,253 | There is no customer defined id or cdk path defined for resource REDACTED, so
we will use the resource logical id as the resource id
2025-12-15 17:59:11,253 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,254 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,254 | There is no customer defined id or cdk path defined for resource REDACTED, so
we will use the resource logical id as the resource id
2025-12-15 17:59:11,254 | There is no customer defined id or cdk path defined for resource REDACTED, so we will
use the resource logical id as the resource id
2025-12-15 17:59:11,255 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,255 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,256 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,256 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,256 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,257 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,257 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,258 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,258 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,259 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,259 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,259 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,260 | There is no customer defined id or cdk path defined for resource REDACTED,
so we will use the resource logical id as the resource id
2025-12-15 17:59:11,260 | There is no customer defined id or cdk path defined for resource REDACTED, so we
will use the resource logical id as the resource id
2025-12-15 17:59:11,261 | There is no customer defined id or cdk path defined for resource
REDACTED, so we will use the resource logical id as the resource id
2025-12-15 17:59:11,262 | 23 resources found in the stack
2025-12-15 17:59:11,262 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,263 | --base-dir is not presented, adjusting uri REDACTED/ relative to
/XXXX/template.yaml
2025-12-15 17:59:11,263 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,263 | --base-dir is not presented, adjusting uri REDACTED/ relative to
/XXXX/template.yaml
2025-12-15 17:59:11,264 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,264 | --base-dir is not presented, adjusting uri REDACTED/ relative to
/XXXX/template.yaml
2025-12-15 17:59:11,265 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,265 | --base-dir is not presented, adjusting uri REDACTED/ relative to
/XXXX/template.yaml
2025-12-15 17:59:11,265 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,265 | --base-dir is not presented, adjusting uri REDACTED/ relative to
/XXXX/template.yaml
2025-12-15 17:59:11,266 | ContainerClientFactory.create_client() called
2025-12-15 17:59:11,267 | Administrator config file not found on macOS: /Library/Preferences/com.amazon.samcli.plist.
2025-12-15 17:59:11,267 | Admin preference: None
2025-12-15 17:59:11,267 | Using auto-detected client creation
2025-12-15 17:59:11,267 | Trying Docker client creation
2025-12-15 17:59:11,268 | Creating Docker container client from environment variable.
2025-12-15 17:59:11,268 | Creating container client with parameters: {'version': '1.35'}
2025-12-15 17:59:11,268 | DockerContainerClient created successfully
2025-12-15 17:59:11,275 | Using Docker as Container Engine.
2025-12-15 17:59:11,275 | Set global container socket path: container_socket_path=
2025-12-15 17:59:11,294 | 23 resources found in the stack
2025-12-15 17:59:11,295 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,295 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,296 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,296 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,296 | Found Serverless function with name='REDACTED' and
CodeUri='REDACTED/'
2025-12-15 17:59:11,297 | Instantiating build definitions
2025-12-15 17:59:11,299 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip,
00b5dcba9cc02ce2f8914f3638e46719e13bab94fe7f265bae58e38065ba7d26, 4d5e3c3a-53a9-4199-8c23-1a95e22c845b, {}, {}, arm64,
[]), Current: BuildDefinition(ruby3.4, /XXXX/REDACTED,
Zip, , c5220766-76bb-4509-b07f-2bcbc05d44ad, {}, {}, arm64, []), Function: Function({'function_id':
REDACTED))
2025-12-15 17:59:11,302 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip,
00b5dcba9cc02ce2f8914f3638e46719e13bab94fe7f265bae58e38065ba7d26, 4d5e3c3a-53a9-4199-8c23-1a95e22c845b, {}, {}, arm64,
['REDACTED']), Current: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip, ,
76080f54-466f-45e9-836c-da68df4c2934, {}, {}, arm64, []), Function: Function({'function_id': 'REDACTED',
'name': 'REDACTED', 'functionname': '/XXXX/REDACTED', 'runtime':
'ruby3.4', 'memory': 512, 'timeout': 600, 'handler': 'REDACTED.REDACTED.lambda_handler', 'imageuri':
None, 'packagetype': 'Zip', 'imageconfig': None, 'codeuri':
'/XXXX/REDACTED', 'environment': {'Variables':
{REDACTED}, 'rolearn': '/XXXX/REDACTED_ROLE_ARN',
'layers': [], 'events': {'Cron': {'Type': 'Schedule', 'Properties': {'Schedule': 'cron(23 5 * * ? *)'}}}, 'metadata':
{'SamResourceId': 'REDACTED'}, 'inlinecode': None, 'codesign_config_arn': None, 'architectures': ['arm64'],
'function_url_config': None, 'function_build_info': <FunctionBuildInfo.BuildableZip: ('BuildableZip', 'Regular ZIP
function which can be build with SAM CLI')>, 'stack_path': '', 'runtime_management_config': None, 'logging_config':
{'LogGroup': 'REDACTED', 'LogFormat': 'JSON', 'SystemLogLevel': 'WARN'}, 'tenancy_config': None,
'durable_config': None, 'capacity_provider_config': None, 'publish_to_latest_published': None}))
2025-12-15 17:59:11,304 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip,
00b5dcba9cc02ce2f8914f3638e46719e13bab94fe7f265bae58e38065ba7d26, 4d5e3c3a-53a9-4199-8c23-1a95e22c845b, {}, {}, arm64,
['XXXX-REDACTED',
'/XXXX/REDACTED_FUNCTION_NAME']), Current: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip, ,
46a4155f-5db9-421a-8394-3d0edd4b5ff1, {}, {}, arm64, []), Function: Function({'function_id':
'REDACTED', 'name': 'REDACTED', 'functionname':
'XXXX-REDACTED', 'runtime': 'ruby3.4', 'memory': 512, 'timeout': 300,
'handler': 'REDACTED.REDACTED.lambda_handler', 'imageuri': None,
'packagetype': 'Zip', 'imageconfig': None, 'codeuri':
'/XXXX/REDACTED', 'environment': {'Variables':
REDACTED}, 'rolearn':
'/XXXX/REDACTED_ROLE_ARN', 'layers': [], 'events': {'Cron': {'Type':
'Schedule', 'Properties': {'Schedule': 'cron(0 6 * * ? *)'}}}, 'metadata': {'SamResourceId':
'REDACTED'}, 'inlinecode': None, 'codesign_config_arn': None, 'architectures': ['arm64'],
'function_url_config': None, 'function_build_info': <FunctionBuildInfo.BuildableZip: ('BuildableZip', 'Regular ZIP
function which can be build with SAM CLI')>, 'stack_path': '', 'runtime_management_config': None, 'logging_config':
{'LogGroup': 'REDACTED', 'LogFormat': 'JSON', 'SystemLogLevel': 'WARN'},
'tenancy_config': None, 'durable_config': None, 'capacity_provider_config': None, 'publish_to_latest_published': None}))
2025-12-15 17:59:11,306 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip,
00b5dcba9cc02ce2f8914f3638e46719e13bab94fe7f265bae58e38065ba7d26, 4d5e3c3a-53a9-4199-8c23-1a95e22c845b, {}, {}, arm64,
['XXXX-REDACTED', '/XXXX/REDACTED_FUNCTION_NAME',
'XXXX-REDACTED']), Current: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip, ,
22bf2d28-2e1b-4227-9d6e-14c8bdbcd64b, {}, {}, arm64, []), Function: Function({'function_id':
'REDACTED', 'name': 'REDACTED', 'functionname':
'XXXX-REDACTED', 'runtime': 'ruby3.4', 'memory': 512, 'timeout': 30, 'handler':
'REDACTED.REDACTED.lambda_handler', 'imageuri': None, 'packagetype': 'Zip', 'imageconfig':
None, 'codeuri': '/XXXX/REDACTED', 'environment':
{'Variables': REDACTED}, 'rolearn':
'/XXXX/REDACTED_ROLE_ARN', 'layers': [], 'events': None, 'metadata':
{'SamResourceId': 'REDACTED'}, 'inlinecode': None, 'codesign_config_arn': None, 'architectures':
['arm64'], 'function_url_config': None, 'function_build_info': <FunctionBuildInfo.BuildableZip: ('BuildableZip',
'Regular ZIP function which can be build with SAM CLI')>, 'stack_path': '', 'runtime_management_config': None,
'logging_config': {'LogGroup': 'REDACTED', 'LogFormat': 'JSON', 'SystemLogLevel': 'WARN'},
'tenancy_config': None, 'durable_config': None, 'capacity_provider_config': None, 'publish_to_latest_published': None}))
2025-12-15 17:59:11,309 | Same function build definition found, adding function (Previous: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip,
00b5dcba9cc02ce2f8914f3638e46719e13bab94fe7f265bae58e38065ba7d26, 4d5e3c3a-53a9-4199-8c23-1a95e22c845b, {}, {}, arm64,
['XXXX-REDACTED', '/XXXX/REDACTED_FUNCTION_NAME',
'XXXX-REDACTED',
'XXXX-REDACTED']), Current: BuildDefinition(ruby3.4,
/XXXX/REDACTED, Zip, ,
0f255bcd-1383-4803-aa80-541d5a355fae, {}, {}, arm64, []), Function: Function({'function_id': 'REDACTED',
'name': 'REDACTED', 'functionname': 'XXXX-REDACTED', 'runtime': 'ruby3.4',
'memory': 512, 'timeout': 120, 'handler': 'REDACTED.REDACTED.lambda_handler', 'imageuri': None,
'packagetype': 'Zip', 'imageconfig': None, 'codeuri':
'/XXXX/REDACTED', 'environment': {'Variables':
REDACTED}, 'rolearn':
'/XXXX/REDACTED_ROLE_ARN', 'layers': [], 'events': {'Cron': {'Type': 'Schedule',
'Properties': {'Schedule': 'cron(35 * * * ? *)'}}}, 'metadata': {'SamResourceId': 'REDACTED'}, 'inlinecode':
None, 'codesign_config_arn': None, 'architectures': ['arm64'], 'function_url_config': None, 'function_build_info':
<FunctionBuildInfo.BuildableZip: ('BuildableZip', 'Regular ZIP function which can be build with SAM CLI')>,
'stack_path': '', 'runtime_management_config': None, 'logging_config': {'LogGroup': 'REDACTED',
'LogFormat': 'JSON', 'SystemLogLevel': 'WARN'}, 'tenancy_config': None, 'durable_config': None,
'capacity_provider_config': None, 'publish_to_latest_published': None}))
2025-12-15 17:59:11,312 | Async execution started
2025-12-15 17:59:11,312 | Invoking function functools.partial(<bound method
ParallelBuildStrategy.build_single_function_definition of <samcli.lib.build.build_strategy.ParallelBuildStrategy object
at 0x111324850>>, <samcli.lib.build.build_graph.FunctionBuildDefinition object at 0x1115b7d10>)
2025-12-15 17:59:11,313 | Running incremental build for runtime ruby3.4 for following resources (REDACTED,
REDACTED, REDACTED, REDACTED, REDACTED)
2025-12-15 17:59:11,313 | Waiting for async results
2025-12-15 17:59:11,315 | Cache is invalid, running build and copying resources for following functions
(REDACTED, REDACTED, REDACTED, REDACTED,
REDACTED)
2025-12-15 17:59:11,316 | Building codeuri:
/XXXX/REDACTED runtime: ruby3.4 architecture: arm64
functions: REDACTED, REDACTED, REDACTED, REDACTED,
REDACTED
2025-12-15 17:59:11,316 | Building to following folder
/XXXX/.aws-sam/build/REDACTED
2025-12-15 17:59:11,318 | Checking free port on 127.0.0.1:7183
Fetching public.ecr.aws/sam/build-ruby3.4:latest-arm64 Docker container image......
2025-12-15 17:59:12,106 | Mounting /XXXX/REDACTED as
/tmp/samcli/source:ro,delegated, inside runtime container
2025-12-15 17:59:12,109 | ContainerClientFactory.create_client() called
2025-12-15 17:59:12,110 | Administrator config file not found on macOS: /Library/Preferences/com.amazon.samcli.plist.
2025-12-15 17:59:12,112 | Admin preference: None
2025-12-15 17:59:12,113 | Using auto-detected client creation
2025-12-15 17:59:12,114 | Trying Docker client creation
2025-12-15 17:59:12,115 | Creating Docker container client from environment variable.
2025-12-15 17:59:12,115 | Creating container client with parameters: {'version': '1.35'}
2025-12-15 17:59:12,117 | DockerContainerClient created successfully
2025-12-15 17:59:12,126 | Using Docker as Container Engine.
2025-12-15 17:59:12,127 | Set global container socket path: container_socket_path=
2025-12-15 17:59:12,298 | SAM_CONTAINER_ID: b760d87aefcdb2f9bdebc191e71f6d0fe57a1917f9d9ded985a3cc5313a3ccf6
2025-12-15 17:59:12,299 | Initialized container b760d87aefcdb2f9bdebc191e71f6d0fe57a1917f9d9ded985a3cc5313a3ccf6 with
max_concurrency=1
Using the request object from command line argument
Loading workflow module 'aws_lambda_builders.workflows'
Registering workflow 'CustomMakeBuilder' with capability 'Capability(language='provided', dependency_manager=None, application_framework=None)'
Registering workflow 'DotnetCliPackageBuilder' with capability 'Capability(language='dotnet', dependency_manager='cli-package', application_framework=None)'
Registering workflow 'GoModulesBuilder' with capability 'Capability(language='go', dependency_manager='modules', application_framework=None)'
Registering workflow 'JavaGradleWorkflow' with capability 'Capability(language='java', dependency_manager='gradle', application_framework=None)'
Registering workflow 'JavaMavenWorkflow' with capability 'Capability(language='java', dependency_manager='maven', application_framework=None)'
Registering workflow 'NodejsNpmBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm', application_framework=None)'
Registering workflow 'NodejsNpmEsbuildBuilder' with capability 'Capability(language='nodejs', dependency_manager='npm-esbuild', application_framework=None)'
Registering workflow 'PythonPipBuilder' with capability 'Capability(language='python', dependency_manager='pip', application_framework=None)'
Registering workflow 'RubyBundlerBuilder' with capability 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
Registering workflow 'RustCargoLambdaBuilder' with capability 'Capability(language='rust', dependency_manager='cargo', application_framework=None)'
Found workflow 'RubyBundlerBuilder' to support capabilities 'Capability(language='ruby', dependency_manager='bundler', application_framework=None)'
Running workflow 'RubyBundlerBuilder'
Running RubyBundlerBuilder:CopySource
Creating target folders at /tmp/samcli/artifacts
Copying directory metadata from source (/tmp/samcli/source) to destination (/tmp/samcli/artifacts)
Copying source file (/tmp/samcli/source/REDACTED.rb) to destination (/tmp/samcli/artifacts/REDACTED.rb)
Copying source file (/tmp/samcli/source/.ruby-version) to destination (/tmp/samcli/artifacts/.ruby-version)
Copying source file (/tmp/samcli/source/REDACTED.rb) to destination (/tmp/samcli/artifacts/REDACTED.rb)
Copying source file (/tmp/samcli/source/acme_challenge_endpoint.rb) to destination (/tmp/samcli/artifacts/acme_challenge_endpoint.rb)
Copying source file (/tmp/samcli/source/REDACTED.rb) to destination (/tmp/samcli/artifacts/REDACTED.rb)
Copying source file (/tmp/samcli/source/REDACTED.rb) to destination (/tmp/samcli/artifacts/REDACTED.rb)
Creating target folders at /tmp/samcli/artifacts/lib
Copying directory metadata from source (/tmp/samcli/source/lib) to destination (/tmp/samcli/artifacts/lib)
Copying source file (/tmp/samcli/source/lib/lets_encrypt_certificate.rb) to destination (/tmp/samcli/artifacts/lib/lets_encrypt_certificate.rb)
Copying source file (/tmp/samcli/source/lib/certificate.rb) to destination (/tmp/samcli/artifacts/lib/certificate.rb)
Copying source file (/tmp/samcli/source/Gemfile) to destination (/tmp/samcli/artifacts/Gemfile)
Copying source file (/tmp/samcli/source/Gemfile.lock) to destination (/tmp/samcli/artifacts/Gemfile.lock)
Creating target folders at /tmp/samcli/artifacts/concerns
Copying directory metadata from source (/tmp/samcli/source/concerns) to destination (/tmp/samcli/artifacts/concerns)
Copying source file (/tmp/samcli/source/concerns/email_notifications.rb) to destination (/tmp/samcli/artifacts/concerns/email_notifications.rb)
Copying source file (/tmp/samcli/source/concerns/slack_notifications.rb) to destination (/tmp/samcli/artifacts/concerns/slack_notifications.rb)
RubyBundlerBuilder:CopySource succeeded
Running RubyBundlerBuilder:RubyBundle
Running bundle install in /tmp/samcli/artifacts
executing Bundler: ['bundle', 'install', '--without', 'development', 'test']
Bundler output: Bundler 2.7.2 is running, but your lockfile was generated with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.1
Installing bundler 4.0.1
Bundler error: [DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
The `--without` flag has been removed because it relied on being remembered
across bundler invocations, which bundler no longer does. Instead please use
`bundle config set without 'development test'`, and stop using this flag
RubyBundlerBuilder:RubyBundle failed
Traceback (most recent call last):
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflows/ruby_bundler/actions.py", line 31, in execute
self.subprocess_bundler.run(["install", "--without", "development", "test"], cwd=self.source_dir)
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflows/ruby_bundler/bundler.py", line 82, in run
raise BundlerExecutionError(message=message_out)
aws_lambda_builders.workflows.ruby_bundler.bundler.BundlerExecutionError: Bundler Failed: Bundler 2.7.2 is running, but your lockfile was generated with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.1
Installing bundler 4.0.1
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
The `--without` flag has been removed because it relied on being remembered
across bundler invocations, which bundler no longer does. Instead please use
`bundle config set without 'development test'`, and stop using this flag
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflow.py", line 374, in run
action.execute()
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflows/ruby_bundler/actions.py", line 33, in execute
raise ActionFailedError(str(ex))
aws_lambda_builders.actions.ActionFailedError: Bundler Failed: Bundler 2.7.2 is running, but your lockfile was generated with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.1
Installing bundler 4.0.1
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
The `--without` flag has been removed because it relied on being remembered
across bundler invocations, which bundler no longer does. Instead please use
`bundle config set without 'development test'`, and stop using this flag
Builder workflow failed
Traceback (most recent call last):
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflows/ruby_bundler/actions.py", line 31, in execute
self.subprocess_bundler.run(["install", "--without", "development", "test"], cwd=self.source_dir)
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflows/ruby_bundler/bundler.py", line 82, in run
raise BundlerExecutionError(message=message_out)
aws_lambda_builders.workflows.ruby_bundler.bundler.BundlerExecutionError: Bundler Failed: Bundler 2.7.2 is running, but your lockfile was generated with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.1
Installing bundler 4.0.1
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
The `--without` flag has been removed because it relied on being remembered
across bundler invocations, which bundler no longer does. Instead please use
`bundle config set without 'development test'`, and stop using this flag
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflow.py", line 374, in run
action.execute()
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflows/ruby_bundler/actions.py", line 33, in execute
raise ActionFailedError(str(ex))
aws_lambda_builders.actions.ActionFailedError: Bundler Failed: Bundler 2.7.2 is running, but your lockfile was generated with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.1
Installing bundler 4.0.1
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
The `--without` flag has been removed because it relied on being remembered
across bundler invocations, which bundler no longer does. Instead please use
`bundle config set without 'development test'`, and stop using this flag
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/__main__.py", line 117, in main
builder.build(
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/builder.py", line 172, in build
return workflow.run()
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflow.py", line 116, in wrapper
func(self, *args, **kwargs)
File "/usr/local/opt/lambda-builders/lib64/python3.9/site-packages/aws_lambda_builders/workflow.py", line 381, in run
raise WorkflowFailedError(workflow_name=self.NAME, action_name=action.NAME, reason=str(ex))
aws_lambda_builders.exceptions.WorkflowFailedError: RubyBundlerBuilder:RubyBundle - Bundler Failed: Bundler 2.7.2 is running, but your lockfile was generated with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.1
Installing bundler 4.0.1
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
The `--without` flag has been removed because it relied on being remembered
across bundler invocations, which bundler no longer does. Instead please use
`bundle config set without 'development test'`, and stop using this flag
2025-12-15 17:59:14,038 | Build inside container returned response {"jsonrpc": "2.0", "id": 1, "error": {"code": 400,
"message": "RubyBundlerBuilder:RubyBundle - Bundler Failed: Bundler 2.7.2 is running, but your lockfile was generated
with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.\nFetching gem metadata from
https://rubygems.org/.\nFetching bundler 4.0.1\nInstalling bundler 4.0.1\n[DEPRECATED] The `--without` flag is
deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future
versions. Instead please use `bundle config set without 'development test'`, and stop using this flag\nDon't run Bundler
as root. Installing your bundle as root will break this\napplication for all non-root users on this machine.\nThe
`--without` flag has been removed because it relied on being remembered\nacross bundler invocations, which bundler no
longer does. Instead please use\n`bundle config set without 'development test'`, and stop using this flag"}}
2025-12-15 17:59:14,200 | Exception raised during the execution
Build Failed
2025-12-15 17:59:14,204 | Telemetry endpoint configured to be
https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2025-12-15 17:59:14,206 | No container socket path in global storage, falling back to DOCKER_HOST detection:
2025-12-15 17:59:14,208 | Telemetry endpoint configured to be
https://aws-serverless-tools-telemetry.us-west-2.amazonaws.com/metrics
2025-12-15 17:59:14,209 | Unable to find Click Context for getting session_id.
Error: RubyBundlerBuilder:RubyBundle - Bundler Failed: Bundler 2.7.2 is running, but your lockfile was generated with 4.0.1. Installing Bundler 4.0.1 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 4.0.1
Installing bundler 4.0.1
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag
Don't run Bundler as root. Installing your bundle as root will break this
application for all non-root users on this machine.
The `--without` flag has been removed because it relied on being remembered
across bundler invocations, which bundler no longer does. Instead please use
`bundle config set without 'development test'`, and stop using this flag
2025-12-15 17:59:14,212 | No container socket path in global storage, falling back to DOCKER_HOST detection:Steps to reproduce:
Run sam build for a ruby application that uses bundler >= 4.0
Observed result:
See above
Expected result:
Build not to fail.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
- OS: Mac
sam --version: 1.150.1- AWS region: us-east-2
# Paste the output of `sam --info` here
{
"version": "1.150.1",
"system": {
"python": "3.11.10",
"os": "macOS-15.7.2-arm64-arm-64bit"
},
"additional_dependencies": {
"container_engine": "Docker(v28.4.0)",
"aws_cdk": "Not available",
"terraform": "1.14.1"
},
"available_beta_feature_env_vars": [
"SAM_CLI_BETA_FEATURES",
"SAM_CLI_BETA_BUILD_PERFORMANCE",
"SAM_CLI_BETA_TERRAFORM_SUPPORT",
"SAM_CLI_BETA_PACKAGE_PERFORMANCE",
"SAM_CLI_BETA_RUST_CARGO_LAMBDA"
]
}
Add --debug flag to command you are running
Metadata
Metadata
Assignees
Labels
stage/needs-triageAutomatically applied to new issues and PRs, indicating they haven't been looked at.Automatically applied to new issues and PRs, indicating they haven't been looked at.