On Mon, Aug 15, 2011 at 03:04, Eric Hodel <drbrain / segment7.net> wrote:
> I've never tried to embed ruby so maybe I don't understand the difficulty=
 you're facing.
>
> In order to change the gem paths in ruby (not embedded) you either set GE=
M_HOME and GEM_PATH through environment variables before ruby has started o=
r you set the path through Gem.paths=3D in your application. =A0There isn't=
 a way to set the default paths through C code.
>
> You could probably also use lib/rubygems/operating_system.rb. =A0See "Rub=
yGems Defaults, Packaging" in `ri Gem`, but that's not really through C cod=
e either.

I want to init the gem path with the available gems, ruby does that
internally but there is no way to do that without either
invoking ruby_options() or do it manually. Before 1.9.3 I could just
add a prototype for Init_prelude and call it, but the
symbol is hidden completely now.

There is a ticket about which would really ease this whole thing:

http://redmine.ruby-lang.org/issues/5174



--=20
With best regards
Christoph