[MacRuby] #855: MacRuby should load the "rubygems" automatically.
#855: MacRuby should load the "rubygems" automatically. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- {{{ $ ruby -v -e "p Gem.class" ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-darwin10] Module $ /usr/bin/ruby -v -e "p Gem.class" ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] -e:1: uninitialized constant Gem (NameError) $ macruby -v -e "p Gem.class" MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, x86_64] /Users/watson/src/MacRuby/-e:1:in `<main>': uninitialized constant Gem (NameError) }}} {{{ $ cat test.rb #!ruby $LOADED_FEATURES.each do |file| puts file end }}} Runs above script, I found that the "rubygems" is loaded automatically with Ruby 1.9. {{{ $ ruby test.rb enumerator.so /opt/local/lib/ruby1.9/1.9.1/i386-darwin10/enc/encdb.bundle /opt/local/lib/ruby1.9/1.9.1/i386-darwin10/enc/trans/transdb.bundle /opt/local/lib/ruby1.9/1.9.1/rubygems.rb }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/855> MacRuby <http://macruby.org/>
#855: MacRuby should load the "rubygems" automatically. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): That's a well-known issue. We can't load rubygems automatically because it would slow down the boot time significantly, and the gem_prelude mechanism (which is what 1.9 uses) doesn't seem to behave well either. -- Ticket URL: <http://www.macruby.org/trac/ticket/855#comment:1> MacRuby <http://macruby.org/>
#855: MacRuby should load the "rubygems" automatically. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby Later Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Changes (by lsansonetti@…): * milestone: => MacRuby Later Comment: There are potential solutions to this problem, such as requiring rubygems lazily or integrating the rubygems #require logic in Kernel#require. However, this is a significant piece of work and it's probably not needed for 1.0, as most people deliver their applications via rubygems, which will install helper executables that automatically load rubygems. -- Ticket URL: <http://www.macruby.org/trac/ticket/855#comment:2> MacRuby <http://macruby.org/>
#855: MacRuby should load the "rubygems" automatically. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: minor | Milestone: MacRuby Later Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by nakahiro@…): CRuby 1.9.1 and 1.9.2 have somewhat similar issue on slow rubygem loading (and incomplete prelude hook) but 1.9.3 should fix issues around it. Now RubyGems should load faster than before and no troublesome prelude exists. It may be a time to give another try for enabling this feature again? -- Ticket URL: <http://www.macruby.org/trac/ticket/855#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby