The closest thing to what you're describing is Tokaido, and AFAIK it's still a work in progress. The other project that comes to mind is Vagrant, although it's mostly for development.
Streamlined Ruby code deployments
-
06-03-2022 - |
题
Here's my imagined development and deployment process:
- Create project directory
my_project
. - Install the required Ruby version into it.
- Install the required gems.
- Write some code.
- Use
fpm
to package the whole thing. - Ship the debian package to a production box and install.
I use RVM and Bundler to address some of the pain points but RVM doesn't care about creating relocatable Ruby installations so you can't move ~/.rvm/rubies
into the project directory and expect everything to just work out. You have to rewrite all sorts of hard-coded #!
lines and in some instances you have to move .so
files into the lib
directory. I hacked together a set of scripts by scouring the internets that, together, accomplish what I want but the whole thing feels like a huge hack.
I accidentally stumbled on https://github.com/ot/bpt which could be used to build something that would allow for completely relocatable Ruby installations but that project hasn't been touched in more than two years so I'm a little hesitant to build something on top of it.
Is there a more elegant solution to this problem that I'm not seeing? How do people isolate and deploy Ruby projects? I feel like this should be a solved problem.
解决方案