I see. The jets-rails gem required rails >= 6.1
. I went ahead and released a jets-rails 1.0.3 update gem pin rails >= 5.0 by tongueroo · Pull Request #13 · rubyonjets/jets-rails · GitHub, which updates the pin to rails > 5.0
. I believe Jets should work with that version of Rails, too. I have not tested it as thoroughly, but Rails is Rack compatible, so it should work. And Rails engines have mostly stayed the same since Rails 3.
Some notes:
- jets itself no longer has rails as a dependency at all jets/jets.gemspec at master · rubyonjets/jets · GitHub
- Only jets-rails requires rails and that has been updated.
That being said, rails 5.1.5 and ruby 2.6.3 is pretty old. Gut says, I would try to get it to at least Rails 6 and Ruby 3.2.3. Totally get it if it’s not feasible for you and your team at this time. Personally, I would probably try to get it to the latest Rails 7.1 But again, I totally get it.
Also, try approaching it in steps:
- Go through the learn guide with an updated Rails 7.1 CRUD app Rails Project - Jets Serverless Deployment Service
- Here’s a video demo also Serverless Rails on AWS Lambda with Jets | BoltOps Learn
- Go back to your app and try your app with the latest release jets-rails. IE:
bundle update
and give try ajets deploy
- If that doesn’t work. It’s time to start upgrading Rails and Ruby. Note: If you think it’ll be helpful, the issues you run into might be useful to report. Maybe in a separated dedicated thread.
It would help to isolate if there are Rails 5.1 vs. Rails 7.1-specific issues. In theory, Rails 5 should work. Again, I haven’t tested that version thoroughly yet. Eventually, there’ll be a CI matrix that tests different permutations of Rails version and other frameworks with live deployments to one of my AWS test accounts.