The path of the gem should be relative from `MRUBY_ROOT`.
It was relative from the directory of the build configuration file, but
the document says it's relative from `MRUBY_ROOT`. When the default
configuration file was `MRUBY_ROOT/build_config.rb`, it was OK for most
of the cases.
MODIFY
lib/mruby/build/load_gems.rb
lib/mruby/build/load_gems.rb
@@ -18,8 +18,7 @@ module MRuby
elsif GemBox.path && gemdir.is_a?(String)
gemdir = File.expand_path(gemdir, File.dirname(GemBox.path))
else
- caller_dir = File.expand_path(File.dirname(caller(1,1)[0][/^(.*?):\d/,1]))
- gemdir = File.expand_path(gemdir, caller_dir)
+ gemdir = File.expand_path(gemdir, MRUBY_ROOT)
end
gemrake = File.join(gemdir, "mrbgem.rake")

The path of the gem should be relative from `MRUBY_ROOT`.

It was relative from the directory of the build configuration file, but
the document says it's relative from `MRUBY_ROOT`. When the default
configuration file was `MRUBY_ROOT/build_config.rb`, it was OK for most
of the cases.