如何将 Rails 打包为独立的可执行文件

发布于 2024-09-24 12:26:35 字数 234 浏览 2 评论 0原文

我一直在开发一个 Web 应用程序,很多客户都在询问他们是否可以在他们的网络中托管该应用程序(出于安全原因)。我一直在寻找一种将 Rails 应用程序打包成单个可执行文件(包含服务器和所有内容)的方法,但一直找不到任何东西。我的另一个要求是我们在没有来源的情况下分发它。因此我一直在关注 JRuby 和 Warbler。最终产品应在 Linux 或 Windows 上运行。以前有没有人做过类似的事情,或者有人可以指出我正确的方向。

谢谢

I've been developing a web application and a lot of customers are asking if they can host the application in their network (for security reasons). I have been looking for a way to package up a rails app into a single executable (with server and all), but haven't been able to find anything. My other requirement is that we distribute it without the source. Because of that I was looking at JRuby and Warbler. The end product should run on linux or windows. Has anyone done anything like this before, or can anyone point me in the right direction.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

南烟 2024-10-01 12:26:35

我最好的猜测是使用 JRuby 和 JRubyCompiler,尽管我不知道是否您可以编译整个 Rails 项目(包括所有必需的 gem)。不过我用它来编译一个小的 ruby​​ 脚本。不管怎样,如果你成功了,你可以将它们打包到 jar 或 war 中并将其部署为包含的应用程序。

My best guess would be to use JRuby and the JRubyCompiler, although I have no idea if you could compile a whole rails project (including all the required gems). I got it to compile a small ruby script though. Anyway, if you succeed, you could package those in a jar or war and deploy that as a contained application.

失眠症患者 2024-10-01 12:26:35

听起来您不一定需要将其打包为可执行文件,只要代码被混淆即可。我个人不需要保护我的任何代码,但是快速的谷歌搜索返回了这个产品 http://rubyencoder.com/ 。我确信还有其他人,但基本思想是您的代码不可读且无法进行逆向工程。这将允许您运行标准的 Rails 环境,而无需授予对源代码的访问权限。

It doesn't sound like you necessarily need to package it as an executable, as long as the code is obfuscated. I personally haven't needed to protect any of my code, but a quick google search returned this product http://rubyencoder.com/. I'm sure there are others out there, but the basic idea is that your code is unreadable and cannot be reverse engineered. This would allow you to run a standard rails environment without giving access to your source code.

可是我不能没有你 2024-10-01 12:26:35

如果您有预算并且确实想外包此项目,Github 人员与 BitRock 合作构建了他们的跨平台可安装产品 (Github 防火墙安装)。 BitRock 其网站上有此案例研究

If you have the budget and really want to outsource this, the Github guys partnered with BitRock to build their cross-platform installable product (Github Firewall Install). BitRock has this case study on their website.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文