Closed zeetao closed 5 years ago
Looking at the error message. It looks like bin/rackup
is missing. That should get generated as part of jets import:rails
, so that's odd.
=> cd ./rack && bin/rackup --host 127.0.0.1
sh: bin/rackup: No such file or directory
RE: but then it takes a terribly long time to serve assets. God knows why.
This is likely due to hot-reloading and having lots of assets or files to load. You can start the server up with --no-reload
but then you'll have to restart the server manually when you make changes. Hot-reloading is an area that would like to be improved. Happy to take pull requests on this. 👌
Anyway, though Mega Mode is still around, a better version of Rails support was released in Jets v1.4+ Here are the links:
Please have a look at that. The flow is much more simple. Glad to hear you're trying this approach though.
I am trying all kinds of things to discover the capabilities of Jets. I will try to this afterburner method. I would still want to try to deploy my static site to aws directly. Not sure why bin/rackup isn't there. What can I do to fix this?
Zee
On Sun, 23 Dec 2018 at 11:27, Tung Nguyen notifications@github.com wrote:
Looking at the error message. It looks like bin/rackup is missing. That should get generated as part of jets import:rails, so that's odd.
=> cd ./rack && bin/rackup --host 127.0.0.1
sh: bin/rackup: No such file or directory
RE: but then it takes a terribly long time to serve assets. God knows why.
This is likely due to hot-reloading and having lots of assets or files to load. You can start the server up with --no-reload but then you'll have to restart the server manually when you make changes. Hot-reloading is an area that would like to be improved. Happy to take pull requests on this. 👌
Anyway, though Mega Mode is still around, a better version of Rails support was released in Jets v1.4+ Here are the links:
- Rails Support http://rubyonjets.com/docs/rails-support/
- Jets Afterburner: Serverless Rails on AWS Lambda in 5 Minutes https://blog.boltops.com/2018/12/21/jets-afterburner-serverless-rails-on-aws-lambda-in-5-minutes
Please have a look at that. The flow is much more simple. Glad to hear you're trying this approach though.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tongueroo/jets/issues/114#issuecomment-449611856, or mute the thread https://github.com/notifications/unsubscribe-auth/ABDK7DD98wmU3hj2Sxw3x7gtoHneWNoVks5u7vgogaJpZM4ZfsAE .
Right, so as mentioned in #105 , think that this full port approach is going to be a bit of work. I mentioned this in the Ruby on Rails Podcast Episode #253 also. Think Jets makes a great use case for microservices and glue code. It's cool that you're doing a full port to learn also, and am sure you'll learn a lot. It is a lot of work though.
Would like to improve this. And would be awesome if someone wants to help in this area. For example, one key improvement is to allow view helpers to handle model objects. No sweat either way 👌
Here's just a suggestion: generate a new jets app from scratch from the quick start. Then slowly go piece by piece from there instead of copying your whole enchilada over and then fixing afterward. In this way you get a few errors little by little and can tackle one at a time systematically, learning along the way.
Also from the new app and running a jets import:rails
, you can grab the bin/rackup
from there.
I followed the instructions for Mega Mode from https://blog.boltops.com/2018/11/03/jets-mega-mode-run-rails-on-aws-lambda I created a new project, and then linked my rails project, watched jets pull the rails project into the rack folder. I tested the rack app using bundle exec rackup from the rack folder and see my rails app being run on port 9292. When I run jets server, I see the webrick server on port 8888 come up, but the error below indicates the rack app at 9292 isn't started. If I start it manually, then jets server manages to connect to 9292 but then it takes a terribly long time to serve assets. God knows why. Seems like there is a configuration step missing from the docs.