views:

34

answers:

1

How can I generate byetcode from Ruby 1.9??

My intent is to generate bytecode not the source code and ship it along with my application package. I am aware of the JRuby approach but I am facing certain issues there

A: 

Which type of bytecode do you want? Ruby or Java bytecode? You can't generate Ruby bytecode using Ruby 1.9/YARV, although if you try Rubinius it will output .rbc files which are bytecode.

As for Java bytecode, you'd have to check out how to compile the scripts with JRuby (probably jrubyc or something).

robbrit