rubyonjets / jets

Ruby on Jets
http://rubyonjets.com
MIT License
2.6k stars 181 forks source link

Jets app not working on deployment #367

Closed cpobremaximiliandigital closed 5 years ago

cpobremaximiliandigital commented 5 years ago

My Environment

Software Version
Operating System 10.13.6 (OSX High Sierra)
Jets 2.1.7
Ruby 2.5.1

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: Screen Shot 2019-09-10 at 10 04 35 AM

Step-by-step reproduction instructions

tongueroo commented 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:

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.