This is nice, and works like a charm. But so far itt seems to me that 
Mruby can only use gems specifically targeted for it, and even those 
have to be specified at build time. Actually, I'd like to give more or 
less free hand to the users of my app with regards to the ruby code they 
want to execute.

So how would I go about using regular gems, especially stuff like 
ActiveSupport? And how can I not have to know these at build time?

thanks
mortee

On 2015.03.27. 21:47, Carlo E. Prelz wrote:
> 	Subject: Re: embeddig ruby in a C application
> 	Date: Fri 27 Mar 15 09:26:55PM +0100
>
> Quoting mortee (mortee.lists / kavemalna.hu):
>
>> Actually, I 've been trying to make a more-than-trivial test code, e.g.
>> acquire the value of MRUBY_DESCRIPTION from the C side, and do whatever with
>> it. This is important for me because my application will eventually become a
>> dll to be loaded into a host application, and I need to pass stuff back to
>> it, so simply executing "puts MRUBY_DESCRIPTION" won't do the trick.
>>
>> With MRI, I would do that by calling
>>
>> StringValuePtr(rb_const_get(rb_cObject, rb_intern("MRUBY_DESCRIPTION")))
>>
>> Currently, I don't really see how I'd go about that with Mruby.
> A quick search comes up with this example, from source file src/print.c:
>
>    mrb_value msg;
>
>    msg = mrb_const_get(mrb, mrb_obj_value(mrb->object_class),
>                        mrb_intern_lit(mrb, "MRUBY_DESCRIPTION"));
>
> msg is the Mruby String object. Try
>
> printf("The string is <%s>\n",RSTRING_PTR(msg));
>
> Carlo
>