Question

were developing a ruby on rails application for a customer who wants the software to run on his server. So, we want to have a mechanism that enables us to say that the customer may only use the software for a certain time. Is there a way to "compile" the software that prevents the customer from tampering with the code?

Cheers, Henning

No correct solution

OTHER TIPS

I'm afraid this is far from trivial - ruby is script based, and there is no way to stop others from 'tampering' with your code.

There was a discussion about this on https://www.ruby-forum.com/topic/60047, and here is one possible suggestion:

One solution may be to compile a small app that takes an MD5, SHA, or some other checksum of the ruby code and only executes it if it is in an internal hash of allowed files. You could have user-based hashes of allowed files based on who is logged in. Of course you will have to rebuild this app every time you change the ruby code but that could be automated. But a user could run the ruby code directly unless you build in some dependency to the compiled app. If they can see the source code, they can copy it, tamper with it, and run it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top