Executable file on linux

How to convert the script to executable file on Linux.

I mean I don’t want to let someone to see the script content on Linux.

Thanks.

hi CC,

well, might not be exactly what you’re looking for but have a look at
this: How to Use the Command Line to Run Ruby Scripts

this is just putting a shebang line at the beginning of the script,
and marking the file as executable - it will not prohibit people from
being able to open the script itself however. you could always rename
the file - from ‘myapp.rb’ to ‘.myapp.rb’ for example - and this will
hide the file, but of course if someone sees it they can open it.

another option is checking out RubyScript2Exe or AllInOneRuby - though
i think these might have to be run under windows, in a virtual box for
example if your system is linux.

good luck,

  • j

Take a look at crate:

http://github.com/copiousfreetime/crate.git

and exerb:

http://exerb.sourceforge.jp/index.en.html

Note though that in general you won’t be able to prevent a sufficiently
determined bad guy from getting at the source code.

Another option is to use jrubyc to compile your ruby into Java bytecode:

http://kenai.com/projects/jruby/pages/JRubyCompiler

This will produce output which is much harder to reverse, but you may
have to do a bit of extra work if you haven’t tested on JRuby yet.


Alex