The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Ruby 1.9.1 RDoc No Memory Error

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Benjamin Booth

Posts: 238
Nickname: benthere
Registered: Feb, 2005

Benjamin Booth is software architect, programmer, web developer and entreprenuer.
Ruby 1.9.1 RDoc No Memory Error Posted: Feb 3, 2010 5:28 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Benjamin Booth.
Original Post: Ruby 1.9.1 RDoc No Memory Error
Feed Title: Table or Booth?
Feed URL: http://www.benjaminbooth.com/tableorbooth/atom.xml
Feed Description: pick_booth() # Ben on software and restaurant seating
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Benjamin Booth
Latest Posts From Table or Booth?

Advertisement

When running:

gem install wxruby-ruby19

I got the following RDoc error:

Successfully installed wxruby-ruby19-2.0.1-x86-mingw32
1 gem installed
Installing ri documentation for wxruby-ruby19-2.0.1-x86-mingw32...
Updating class cache with 1663 classes...
Installing RDoc documentation for wxruby-ruby19-2.0.1-x86-mingw32...
c:/ruby19/lib/ruby/1.9.1/rdoc/parser.rb:73:in `each': failed to allocate memory (NoMemoryError)
        from c:/ruby19/lib/ruby/1.9.1/rdoc/parser.rb:73:in `grep'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/parser.rb:73:in `binary?'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/parser.rb:90:in `can_parse'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:157:in `block in normalized_file_list'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `each'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `normalized_file_list'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:185:in `list_files_in_directory'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:166:in `block in normalized_file_list'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `each'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:150:in `normalized_file_list'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:197:in `parse_files'
        from c:/ruby19/lib/ruby/1.9.1/rdoc/rdoc.rb:257:in `document'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/doc_manager.rb:177:in `run_rdoc'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/doc_manager.rb:137:in `install_rdoc'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/doc_manager.rb:123:in `generate_rdoc'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/commands/install_command.rb:152:in `block in execute'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/commands/install_command.rb:151:in `each'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/commands/install_command.rb:151:in `execute'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/command.rb:257:in `invoke'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/command_manager.rb:132:in `process_args'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/command_manager.rb:102:in `run'
        from C:/ruby19/lib/ruby/gems/1.9.1/gems/gems/rubygems-update-1.3.5/lib/rubygems/gem_runner.rb:58:in `run'
        from c:/ruby19/bin/gem:21:in `'

For a large gem, RDoc has a loop that begins to chew up available memory.  Ruby's garbage collection utility (GC) can be used to fix this.  To do so edit Ruby's rdoc.rb by inserting:

GC.start

somewhere in the "when directory" switch (see my hacked rdoc.rb).  This will force garbage collection before calling a memory intensive step in the loop.  I was able to install the wxruby plug-in successfully this way.


Read: Ruby 1.9.1 RDoc No Memory Error

Topic: No thanks, God Previous Topic   Next Topic Topic: Continuous Integration Server Review: CruiseControl, Hudson, TeamCity and Cruise

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use