0

I want to prevent my users to read my ruby code.

Are there some efficient tricks to do that (apart from executing my code on a server) ?

Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
JCLL
  • 5,379
  • 5
  • 44
  • 64
  • 2
    Why particularly do you want to stop them from reading the code? You should note that the tools listed below will not stop someone really determined as they generally contain a copy of the source code within them. The most they will do is obfuscate the code and make it difficult to get to. – david4dev Dec 08 '10 at 20:18
  • Duplicate of [Is it possible to compile Ruby to byte code as with python?](http://stackoverflow.com/questions/1972388/is-it-possible-to-compile-ruby-to-byte-code-as-with-python) – Andrew Grimm Dec 09 '10 at 02:27

2 Answers2

6

With jruby you can pack your code in a jar, which makes it less accessible. You've got some options:

Hope this helps

Community
  • 1
  • 1
nathanvda
  • 49,707
  • 13
  • 117
  • 139
2

There are gems like Tar2RubyScript, RubyScript2Exe which help you distributing your ruby code. You can read http://www.erikveen.dds.nl/distributingrubyapplications/rails.html for more information

Raghu
  • 2,543
  • 1
  • 19
  • 24