"Tried to create Proc object without a block" error when running AWS SDK with ruby 3.1

1.1k Views Asked by At

I'm getting the error "tried to create Proc object without a block (ArgumentError)" from the AWS SDK Core gem when trying to run a rails app after upgrading ruby to 3.1.1. This surprises me since it looks like the library is being maintained / used and I haven't found others mentioning this problem. Using aws-sdk-core 3.46.2.

/Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/plugin.rb:61:in `new': tried to create Proc object without a block (ArgumentError)
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/seahorse/client/plugin.rb:61:in `option'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-core/plugins/credentials_configuration.rb:21:in `<class:CredentialsConfiguration>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-core/plugins/credentials_configuration.rb:5:in `<module:Plugins>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-core/plugins/credentials_configuration.rb:3:in `<module:Aws>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-core/plugins/credentials_configuration.rb:1:in `<top (required)>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `block in require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-sts/client.rb:9:in `<top (required)>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-sts.rb:11:in `require_relative'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-sts.rb:11:in `<top (required)>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `block in require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-core-3.46.2/lib/aws-sdk-core.rb:82:in `<top (required)>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `block in require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-kms-1.13.0/lib/aws-sdk-kms.rb:8:in `<top (required)>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `block in require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:257:in `load_dependency'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/activesupport-5.2.4/lib/active_support/dependencies.rb:291:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/aws-sdk-s3-1.31.0/lib/aws-sdk-s3.rb:8:in `<top (required)>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/bundler-2.3.8/lib/bundler/runtime.rb:60:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/bundler-2.3.8/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:in `each'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/bundler-2.3.8/lib/bundler/runtime.rb:55:in `block in require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in `each'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/bundler-2.3.8/lib/bundler/runtime.rb:44:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/bundler-2.3.8/lib/bundler.rb:176:in `require'
    from /Users/jaredsohn/topfunnel/topfunnel-web/config/application.rb:9:in `<top (required)>'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/railties-5.2.4/lib/rails/command/actions.rb:22:in `require'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/railties-5.2.4/lib/rails/command/actions.rb:22:in `require_application!'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/railties-5.2.4/lib/rails/command/actions.rb:14:in `require_application_and_environment!'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/railties-5.2.4/lib/rails/commands/console/console_command.rb:95:in `perform'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/railties-5.2.4/lib/rails/command/base.rb:69:in `perform'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/railties-5.2.4/lib/rails/command.rb:46:in `invoke'
    from /Users/jaredsohn/.rvm/gems/ruby-3.1.1/gems/railties-5.2.4/lib/rails/commands.rb:18:in `<top (required)>'
    from bin/rails:13:in `require'
    from bin/rails:13:in `<main>'
0

There are 0 best solutions below