Questions tagged [mruby]

mruby is the lightweight implementation of the Ruby language, that can compile to C source; it's intended to make Ruby constructs accessible for embedded systems development.

mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard. mruby can be linked and embedded within your application. We provide the interpreter program "mruby" and the interactive mruby shell "mirb" as examples. You can also compile Ruby programs into compiled byte code using the mruby compiler "mrbc". All those tools reside in "bin" directory. The "mrbc" is also able to generate compiled byte code in a C source file. You can check the "mrbtest" program under the "test" directory.

37 questions
0
votes
0 answers

uninitialized constant MRuby (NameError)

I have a stumbled block with the following errors on Ubuntu Server 16.04 with Ruby and MRuby installed, what is the cryptic error that is missing? Hiredis is installed and compiled with H2O (latest 2.3), the error is still persist, I have no…
James Lei
  • 340
  • 2
  • 5
  • 15
0
votes
1 answer

Embedding mRuby: retrieving mrb_parser_message after parse error

I'm trying to embed mRuby in a Max MSP object. One of the first things I want to setup is error logging in the Max IDE console window. To that effect, after I parse the code ( stored in a C string ) with mrb_parse_string, I expect errors to be…
Jujule
  • 1
  • 3
0
votes
1 answer

mruby: generating readable c code

I am beginning with mruby, and I need a little in generating readable .c code using mrbc. I was following this article : Here it is mentioned : $ mruby/bin/mrbc -Cinit_tester test_program.rb will produce test_program.c with some content. but…
0
votes
0 answers

mruby and embedded language

I am learning mruby and one of the arguments in favor of it I am reading everywhere is that it is easily embeddable I have seen some code where C and mruby is mixed. But I am not very clear about what exactly is embeddable language, and what are…
0
votes
1 answer

mruby-require error: NoMethodError: undefined method 'puts' for main

I managed to compile the mruby code adding the mrubygem - mruby-require from https://github.com/mattn/mruby-require However when I try to call the require './' I get an error. Below is my code: inc.rb def test(a, b) print "Inside the…
programmer
  • 582
  • 2
  • 4
  • 16
0
votes
1 answer

Why won't some mruby examples compile?

I've been trying to get mruby set up for use in C, but I've only had success compiling a simple "hello world" example. Other examples won't compile: when I try to compile https://github.com/mruby/mruby/blob/master/tools/mrbc/mrbc.c, I get this: gcc…
guy0001
  • 35
  • 1
  • 4
0
votes
1 answer

Why is mruby raising "arena overflow error"?

I am receiving this error when I rescue in my MRuby code: arena overflow error I am not familiar with this term and how to fix it. Here is a sample of my C program: while (true) { SDL_Event event; if (SDL_PollEvent(&event)) { if (event.type…
Andrew
  • 227,796
  • 193
  • 515
  • 708
1 2
3