可以在没有源的情况下分发Ruby on Rails应用程序吗?

可以在没有源的情况下分发Ruby on Rails应用程序吗?

问题描述:

我想知道是否可以在没有源代码的情况下分发RoR应用程序进行生产使用?我已经看到这篇文章是SO ,但我的情况有所不同。这是一个由一些线索管理的应用程序,所以我很高兴仍然需要在客户端安装Apache / Mongrel / MySQL。我真正想要的是保护源。编码似乎是一种流行的分发PHP应用程序的方法(例如:帮助功能)。

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编码器看起来不错(我还没有尝试过),但不是可用的我以前使用过IONcube for PHP,它的运行良好,但似乎没有IONcube有兴趣

  • 弹弓 - 在其他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!