Closed cpobremaximiliandigital closed 5 years ago
Unsure. Unable to reproduce. The error shows that it cannot:
cannot load such file -- active_support
On line 2. That's where it require "jets"
gets called by the Jets handler shims. Example:
require "bundler/setup"
require "jets"
Jets.once # runs once in lambda execution context
Some guesses:
.bundle
folder and remove it if it exists.BUNDLE*
env var in case those are interfering. IE: env | grep BUNDLE
. Remove them if they exists.If this can be reproduced on another machine also, then that would be very helpful. One suggestion is to try it on a fresh Cloud9 server. If it's reproduced there, then we know it's not system-specific. If this is not just a newly generated project, then an example project will also help.
Also another idea to debug this is to use the AWS Lambda Console and change the handlers/controllers/posts_controller.rb
shim itself.
Maybe try something like this:
def index(event:, context:)
sh "gem list"
sh "bundle list"
end
def sh(command)
puts "=> #{command}"
puts `#{command}`
end
Run that updated function, and grab the output from CloudWatch lots. Those details may help.
Haven't seen this one before so am interested in what's causing the issue, but will close out until there are more details.
My Environment
Expected Behaviour
I should be able to invoke a function on AWS Lambda Console.
Current Behavior
It was causing an
Internal Server Error
from my end when invoking the deployed Jets app. Here's the screenshot:Step-by-step reproduction instructions
jets deploy