rails-lambda / lamby

🐑🛤 Simple Rails & AWS Lambda Integration
https://lamby.cloud
MIT License
602 stars 29 forks source link

uninitialized constant Kernel::Lamby #139

Closed hopewise closed 1 year ago

hopewise commented 1 year ago

Hello

I am getting this error when I try my lambda rails based app:


START RequestId: 66e7e34e-1619-4e33-b3fd-63471862d7e8 Version: 11
--
  | 2022-12-28T15:58:54.949+03:00 | Critical exception from handler
  | 2022-12-28T15:58:54.949+03:00 | {
  | 2022-12-28T15:58:54.949+03:00 | "errorMessage": "uninitialized constant Kernel::Lamby",
  | 2022-12-28T15:58:54.949+03:00 | "errorType": "Function<NameError>",
  | 2022-12-28T15:58:54.949+03:00 | "stackTrace": [
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/lib/aws_lambda_ric/lambda_handler.rb:26:in `const_get'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/lib/aws_lambda_ric/lambda_handler.rb:26:in `call_handler'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/lib/aws_lambda_ric.rb:81:in `run_user_code'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/lib/aws_lambda_ric.rb:59:in `start_runtime_loop'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/lib/aws_lambda_ric.rb:42:in `run'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/lib/aws_lambda_ric/bootstrap.rb:35:in `bootstrap_handler'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/lib/aws_lambda_ric/bootstrap.rb:8:in `start'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/gems/aws_lambda_ric-2.0.0/bin/aws_lambda_ric:10:in `<top (required)>'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/bin/aws_lambda_ric:23:in `load'",
  | 2022-12-28T15:58:54.949+03:00 | "/usr/local/bundle/bin/aws_lambda_ric:23:in `<main>'"
  | 2022-12-28T15:58:54.949+03:00 | ]
  | 2022-12-28T15:58:54.949+03:00 | }
  | 2022-12-28T15:58:54.976+03:00 | Unknown application error occurred Runtime.Unknown
  | 2022-12-28T15:58:54.976+03:00 | END RequestId: 66e7e34e-1619-4e33-b3fd-63471862d7e8

Any idea ?

metaskills commented 1 year ago

Will need more information? Is this applying the cookiecutter patterns to an existing application? If so, I would check the Gemfile to make sure the lamby gem is there and does not have a require false on it or something.

metaskills commented 1 year ago

Another would be is the lamby gem in the root of the Gemfile or in a specific env?

hopewise commented 1 year ago

oh yes, thank you! its an existing app, it seems we have removed the gem by mistake, sorry my bad.