您可以分发没有源代码的 Ruby on Rails 应用程序吗? [英] Can you Distribute a Ruby on Rails Application without Source?

查看:17
本文介绍了您可以分发没有源代码的 Ruby on Rails 应用程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在没有源代码的情况下分发用于生产用途的 RoR 应用程序?我看过这篇关于SO的帖子,但我的情况有点不同.这将是一个由有一些线索的人管理的应用程序,所以我很高兴仍然需要在客户端安装 Apache/Mongrel/MySQL.我真正想要的是保护源.编码似乎是分发 PHP 应用程序的流行方式(例如:Helpspot).

I'm wondering if it's possible to distribute a RoR app for production use without source code? I've seen this post on SO, but my situation is a little different. This would be an app administered by people with some clue, so I'm cool with still requiring an Apache/Mongrel/MySQL setup on the customer end. All I really want is for the source to be protected. Encoding seems a popular way to go for distributing PHP apps (eg: Helpspot).

我找到了这些潜在的解决方案:

I've found these potential solutions:

  • Zenobfuscate - 然而,并非所有类型的 Ruby 代码都受支持,所以这不算数
  • Ruby Encoder - 可能是最好的选择,因为他们的 PHP 编码器看起来不错(我还没有但是尝试过)但它尚不可用.我之前在 PHP 中使用过 IONcube 并且效果很好,但是 它似乎不是IONcube 有兴趣.
  • Slingshot - 在另一篇 SO 帖子中提到过,但它解决了一个不同的问题我的,来源仍然可见.
  • RubyScript2Exe - 来自 doco,它尚未准备好用于生产,因此算了.
  • Zenobfuscate - not all types of Ruby code is supported however, so that counts that out
  • Ruby Encoder - may be the best option, as their PHP encoder looks alright (I haven't tried it however) but it's not available yet. I've used IONcube for PHP before and it worked well, but it doesn't seem that IONcube is interested yet.
  • Slingshot - it was mentioned in the other SO post, but it solves a different problem to mine and the source is still visible.
  • RubyScript2Exe - from the doco, it's not production ready, so that counts that out.

我听说可能使用 JRuby 和分发字节码可能是实现这一目标的一种方式,但我从未使用过 JRuby,所以我不确定其中涉及到什么.

I've heard that potentially using JRuby and distributing bytecode might be a way to achieve this, but I've never used JRuby so I'm not sure what's involved.

谁能提供任何想法和/或已知示例?理想情况下,我也希望拥有某种自动构建方案.

Can anyone offer any ideas and/or known examples? Ideally I'd love to have some kind of automated build scenario as well.

推荐答案

您现在最好的选择是使用 JRuby.一点背景:我的公司 (BitRock) 与许多专有和商业开源供应商合作.我们帮助他们将通常基于 PHP、Java 或 Ruby 的服务器软件与 Web 服务器或应用程序服务器(Apache、Tomcat)、语言运行时和数据库(通常为 Postgres、MySQL)打包成一个独立的、易于使用的安装程序.我们有大量基于 PHP 的客户(包括您提到的 HelpSpot),但也有一些基于 Rails 的客户.对于 RoR 客户,标准是将 JRuby 与 Tomcat 或 Glassfish 一起使用,尽管在某些情况下,我们还捆绑了一个本地 Ruby 解释器来运行依赖于尚未移植到 JRuby 的库(通常不是应用程序的核心)的特定脚本.JRuby 已经迅速成熟,在许多情况下,它实际上比普通 Ruby 运行代码更快.您还需要考虑,尽管将代码移植到 JRuby 相当简单,但您需要在这方面投入一些时间.您可能需要查看 JRuby Stack,它是您开始使用所需的一切的免费安装程序.祝你好运!

Your best option right now is to use JRuby. A little bit of background: My company (BitRock) works with many proprietary and commercial open source vendors. We help them package their server software, which is typically based on PHP, Java or Ruby together with a web server or application server (Apache, Tomcat), the language runtime and a database (typically Postgres, MySQL) into a self-contained, easy to use installer. We have a large number of PHP-based customers (including HelpSpot, which you mention) but also several Rails-based ones. In the case of the RoR customers the norm is to use JRuby together with Tomcat or Glassfish although in some cases we also bundle a native Ruby interpreter to run specific scripts that rely on libraries not yet ported to JRuby (usually not core to the application). JRuby has matured quickly and in many cases it actually runs their code faster than regular Ruby. You will need to also consider that although porting your code to JRuby is fairly straightforward, you will need to invest some time on that. You may want to check JRuby Stack which is a free installer of everything you need to get started. Good luck!

这篇关于您可以分发没有源代码的 Ruby on Rails 应用程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆