Compiling ruby code

i know very little about ruby, have only looked shortly at rails

Is it possible to compile my own code so that it cannot be viewed by
others ?

much like the zend compiler does for php

Yes and no.

There is Rubyscript2exe:
http://www.erikveen.dds.nl/rubyscript2exe/index.html

That said suspect it would not be too hard to hack into the exe and
retrieve
the script, as I believe it stores the script text and then interprets
it
using an embedded interpreter. I think any language that’s interpreted
will
be hackable, question is how hard you can make it for them. I also
suspect
we can make it a lot harder in Ruby 2.0, with a Ruby VM.

You might also want to check out:
All In One Ruby - AllInOneRuby - A "Just-in-Time and Temporary Installation of Ruby"

=Bill.Barnhill

Simon Nielsen wrote:

i know very little about ruby, have only looked shortly at rails

Is it possible to compile my own code so that it cannot be viewed by
others ?

much like the zend compiler does for php

There’s currently no ruby compiler.

If you want better performance take look at YARV project (
YARV: Yet Another Ruby VM )

If you want to protect your code from reuse, here are some well-known
rules ( http://www.faqs.org/docs/artu/ch01s06.html )

Just INVERT them all and apply INVERTED rules to your code and mind -
and there will be no need to compile or obfuscate your code ever :)))

Le 29 mars 06, à 07:59, Damphyr a écrit :

Well, in this case it’s not exactly hard, it’s more like childlike
easy:
rubyscript2exe untars the whole ruby environment, together with your
script, in the temp directory. Getting the source means browsing the
temp folder :slight_smile:

It’s even easier than that. The executable created has an option
–eee-justextract, which will extract the whole thing in the current
directory…

Guillaume.

Thanks for the link dseverin! Definitely add to my to-do list.

James H.

Bill B. wrote:

Yes and no.

There is Rubyscript2exe:
http://www.erikveen.dds.nl/rubyscript2exe/index.html

That said suspect it would not be too hard to hack into the exe and retrieve
the script, as I believe it stores the script text and then interprets it
using an embedded interpreter. I think any language that’s interpreted will
Well, in this case it’s not exactly hard, it’s more like childlike easy:
rubyscript2exe untars the whole ruby environment, together with your
script, in the temp directory. Getting the source means browsing the
temp folder :slight_smile:
Cheers,
V.-

http://www.braveworld.net/riva