does there exist any compiler to compile ruby code ? we really donot want to distribute source code to our customers. any suggestion is appreciated _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
this was discussed on the list recently. Feel free to search it. But here is the reference. http://www.erikveen.dds.nl/distributingrubyapplications/rails.html adam midas wrote:> does there exist any compiler to compile ruby code ? we really donot > want to > distribute source code to our customers. > > any suggestion is appreciated > > > ------------------------------------------------------------------------ > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
* midas (midas_z-9Onoh4P/yGk@public.gmane.org) [051011 08:35]:> does there exist any compiler to compile ruby code ? we really donot want to > distribute source code to our customers. > > any suggestion is appreciatedI''m not up to date on code obfuscation techniques in Ruby, but have you considered hosting your application for your customers instead of distributing it? Rick -- http://www.rickbradley.com MUPRN: 322 | will be held at their random email haiku | facility at Elm Hill | Pike, Suite Nashville, TN.
midas wrote:> does there exist any compiler to compile ruby code ? we really donot > want to > distribute source code to our customers. > > any suggestion is appreciatedDepends how paranoid you are. At the moment, ruby runs in an interpreter, so there''s no bytecode step before it''s executed. This means that, strictly, you can''t ''compile'' ruby. However, you can wrap a ruby application into an executable which unpacks into a temp directory before executing, then deletes itself on exit. I believe the script to do that was just posted as another reply. As I understand it, the source code would be available in the temp directory while the application was running. Alternatives would be: - Don''t have the clients run the application locally, but keep your smarts to yourself and export a web service and a trivial connector. Probably the easiest option. - Port to YARV and find a way to intercept the bytecode after parsing, and distribute that instead of the wrapped ruby application above. I don''t even want to think about how much work that might be, and even then it would probably be possible to decompile. - Port important functionality to a C library, and wrap that with some trivial ruby to make Rails work with it. Other than that, it would depend on *why* you don''t want to distribute the source code. -- Alex
This topic was already discussed earlier, some solutions have been discussed then : http://thread.gmane.org/gmane.comp.lang.ruby.rails/17881 I won''t discuss the reasons (or the good/bad thing) why you don''t want to distribute your code. IMHO the best way to do what you want : keep it secret and behind your doors is to host the app on your servers. Another one could be to deliver a black box to your client (a server that only you can access, update, etc ...), your client has a nice server in his office/datacenter and can connect to it to work, but can''t do anything else without you. On 10/11/05, Alex Young <alex-qV/boFbD8Meu8LGVeLuP/g@public.gmane.org> wrote:> midas wrote: > > does there exist any compiler to compile ruby code ? we really donot > > want to > > distribute source code to our customers. > > > > any suggestion is appreciated > > Depends how paranoid you are. At the moment, ruby runs in an > interpreter, so there''s no bytecode step before it''s executed. This > means that, strictly, you can''t ''compile'' ruby. However, you can wrap a > ruby application into an executable which unpacks into a temp directory > before executing, then deletes itself on exit. I believe the script to > do that was just posted as another reply. As I understand it, the > source code would be available in the temp directory while the > application was running. > > Alternatives would be: > - Don''t have the clients run the application locally, but keep your > smarts to yourself and export a web service and a trivial connector. > Probably the easiest option. > - Port to YARV and find a way to intercept the bytecode after parsing, > and distribute that instead of the wrapped ruby application above. I > don''t even want to think about how much work that might be, and even > then it would probably be possible to decompile. > - Port important functionality to a C library, and wrap that with some > trivial ruby to make Rails work with it. > > Other than that, it would depend on *why* you don''t want to distribute > the source code. > > -- > Alex > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Thom/ange http://ange.librium.org