From: Christoph Kappel Date: 2011-08-15T19:24:33+09:00 Subject: [ruby-core:38962] Re: Init_prelude gone in 1.9.3 On Mon, Aug 15, 2011 at 03:04, Eric Hodel 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 GEM_HOME and GEM_PATH through environment variables before ruby has started or you set the path through Gem.paths= in your application. �There isn't a way to set the default paths through C code. > > You could probably also use lib/rubygems/operating_system.rb. �See "RubyGems Defaults, Packaging" in `ri Gem`, but that's not really through C code 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 -- With best regards Christoph