Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can gems be used by ruby code compiled with macrubyc

MacRuby 0.5 includes a ruby compiler built on LLVM called macrubyc.

Does anyone know if it would be possible to dynamically load gems from compiled code? Or compile the gems and link them in? Is this planned? Or how compiled code will be able to make use of gems in general.

like image 263
sal Avatar asked Nov 14 '22 13:11

sal


1 Answers

Turns out that as of MacRuby 0.6, something like this will compile

require 'rubygems'
require 'sequel'

DB = Sequel.mysql(...)

But fail at run time trying to load mysql leading me to think that it loads the gems at run time.

like image 200
sal Avatar answered Dec 27 '22 23:12

sal