尝试通过Jets部署到AWS Lambda时,“您的捆绑软件仅支持平台[],但您的本地平台为[“ ruby​​”,“ x86_64-linux”]“”

时间:2019-12-28 19:05:51

标签: ruby-on-rails aws-lambda bundler rubyonjets

我试图用一个新的Rails项目复制此错误,但是尽管Gemfile和Gemfile.lock相同,但我在项目中仅收到该错误。这是来自CloudWatch日志的完整错误:

=> unzip -qo /tmp/rack-4ebb26b1.zip -d /tmp/rack
=> cd /var/task/rack && bin/rackup --host 127.0.0.1
/var/runtime/gems/bundler-2.0.2/lib/bundler/definition.rb:506:in `validate_platforms!': Your bundle only supports platforms [] but your local platforms are ["ruby", "x86_64-linux"], and there's no compatible match between those two lists. (Bundler::ProductionError)
    from /var/runtime/gems/bundler-2.0.2/lib/bundler/definition.rb:471:in `validate_runtime!'
    from /var/runtime/gems/bundler-2.0.2/lib/bundler/inline.rb:53:in `gemfile'
    from /var/task/rack/test.rb:10:in `<top (required)>'
    from /opt/ruby/gems/2.5.0/gems/actionpack-5.1.7/lib/action_controller/metal/strong_parameters.rb:8:in `require'
    from /opt/ruby/gems/2.5.0/gems/actionpack-5.1.7/lib/action_controller/metal/strong_parameters.rb:8:in `<top (required)>'
    from /opt/ruby/gems/2.5.0/gems/actionpack-5.1.7/lib/action_controller.rb:5:in `require'
    from /opt/ruby/gems/2.5.0/gems/actionpack-5.1.7/lib/action_controller.rb:5:in `<top (required)>'
    from /opt/ruby/gems/2.5.0/gems/actionpack-5.1.7/lib/action_controller/railtie.rb:2:in `require'
    from /opt/ruby/gems/2.5.0/gems/actionpack-5.1.7/lib/action_controller/railtie.rb:2:in `<top (required)>'
    from /opt/ruby/gems/2.5.0/gems/activerecord-5.1.7/lib/active_record/railtie.rb:9:in `require'
    from /opt/ruby/gems/2.5.0/gems/activerecord-5.1.7/lib/active_record/railtie.rb:9:in `<top (required)>'
    from /opt/ruby/gems/2.5.0/gems/railties-5.1.7/lib/rails/all.rb:14:in `require'
    from /opt/ruby/gems/2.5.0/gems/railties-5.1.7/lib/rails/all.rb:14:in `block in <top (required)>'
    from /opt/ruby/gems/2.5.0/gems/railties-5.1.7/lib/rails/all.rb:12:in `each'
    from /opt/ruby/gems/2.5.0/gems/railties-5.1.7/lib/rails/all.rb:12:in `<top (required)>'
    from /tmp/rack/config/application.rb:3:in `require'
    from /tmp/rack/config/application.rb:3:in `<top (required)>'
    from /tmp/rack/config/environment.rb:2:in `require_relative'
    from /tmp/rack/config/environment.rb:2:in `<top (required)>'
    from /tmp/rack/config.ru:3:in `require_relative'
    from /tmp/rack/config.ru:3:in `block in <main>'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:55:in `instance_eval'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:55:in `initialize'
    from /tmp/rack/config.ru:in `new'
    from /tmp/rack/config.ru:in `<main>'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:49:in `eval'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:49:in `new_from_string'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/builder.rb:40:in `parse_file'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/server.rb:319:in `build_app_and_options_from_config'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/server.rb:219:in `app'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/server.rb:354:in `wrapped_app'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/server.rb:283:in `start'
    from /opt/ruby/gems/2.5.0/gems/rack-2.0.8/lib/rack/server.rb:148:in `start'
    from bin/rackup.rb:7:in `<main>'

0 个答案:

没有答案