开发者

Can gems be used by ruby code compiled with macrubyc

开发者 https://www.devze.com 2022-12-19 16:41 出处:网络
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 thi

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 开发者_StackOverflow社区will be able to make use of gems in general.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消