1

I've tried running rbx compile but I am not quite sure what to do with the output. I would like to run it with lli, but I get the following error.

$ lli hello.rbc
lli: hello.rbc:2:1: error: expected '=' here
18185007515559028006
^
Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199
Jordan Scales
  • 2,687
  • 4
  • 28
  • 37

1 Answers1

1

You don't run Rubinius byte-compiled code with lli because the .rbc file isn't an LLVM executable. Instead, you run it with a special Rubinius method call that handles pre-compiled bytecode for the Rubinius virtual machine. For example:

rbx -I. -e "Rubinius::CodeLoader.require_compiled 'hello'"

See Running Ruby With No Ruby for more details.

Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199