3 ms·
> So you want me to re-write my 50,000 line Rails app into Go so I can ship a binary instead of Docker? Why can't you compile your Rails app into a binary? Gen
by M_Bakhtiari 8y ago
> So you want me to re-write my 50,000 line Rails app into Go so I can ship a binary instead of Docker?
Why can't you compile your Rails app into a binary? Genuine question, I haven't used Ruby in ages, but I don't see anything special about the language that would prevent this.
- yebyen 8y agoWell, there's Shoes.app which you can use to bundle your application into a vendor package, but there's not really any facility for obfuscating Ruby into executable static objects that I am aware of, neither why you would want it. A MacOS ".app" is just a folder with executables and supporting artifacts/objects in it. (So, quite a bit like a container actually!) I think you're being downvoted because you haven't asked "why" enough times. Why is it that you want a binary? What is it that a container image doesn't give you that you would get some other way by making a binary? Because a container image is, at least usually when translated to its simplest form, a binary (tarball) with an entrypoint (cmd). So what are you hoping to get out of a "compiled" Ruby app that you won't be getting when it's simply Dockerized?
- RVuRnvbM2e 8y agoYou can. You can use this tool called "docker", which nicely bundles all your dependencies with your code, ensures every deployment is identical, and even makes it easy to use kernel-enforced resource isolation.
- darkarmani 8y agoToo bad you have terrible disk IO and problems when your code expects that it has a normal Posix filesystem and logs into the overlay system.
- nickjj 8y ago> Too bad you have terrible disk IO and problems when your code expects that it has a normal Posix filesystem and logs into the overlay system. It depends I suppose. I run Docker for Windows on a 4 year old computer with an SSD and those 50,000 line Rails apps have plenty of speed in development. Rails picks up code changes in about 100ms. Basically it takes longer for me to move my eyes to my browser and hit reload than it does for a Dockerized Rails app to reload the code changes. Flask, Phoenix and Node apps are similarly fast. In production this is a non-issue because the code isn't mounted.