Hello everybody

I have a question: is it possible to compile ruby files into bytecode. Does ruby have something like .pyc files?

I found some discussions online about generating .exe's from ruby files, but what I want to know if it is possible to compile .rb files just like you compile .py files.


Edited by G_S: n/a

5 Years
Discussion Span
Last Post by G_S

It is not possible to generate bytecode with normal Ruby i.e C-Ruby. But I think its possible in Jruby

This very interesting. So, if I understood correctly, this is the same ruby programming language but they removed the standard interpreter and changed it to an interpreter that works using Java bytecode instead of ruby bytecode? So the compiled output is JVM-executable??? Which in turn means I can create Java programs using Ruby?!

If so this is nice :)

Thank you


YEs. It seems that Ruby itself can't generate bytecode, but these other alternatives can.

Thank you all guys.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.