Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "<top (required)>" mean in a Ruby stack trace?

Tags:

ruby

In Ruby 1.9.2 stack trace I frequently see the method given as <top (required)>, as in this section of stack below. What does this mean? Is my Ruby install subtly broken?

Could not find abstract-1.0.0 in any of the sources /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/spec_set.rb:87:in `block in materialize' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/spec_set.rb:81:in `map!' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/spec_set.rb:81:in `materialize' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/definition.rb:90:in `specs' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/definition.rb:135:in `specs_for' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/definition.rb:124:in `requested_specs' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/environment.rb:23:in `requested_specs' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/runtime.rb:11:in `setup' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler.rb:107:in `setup' /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.13/lib/bundler/setup.rb:14:in `<top (required)>' <internal:lib/rubygems/custom_require>:33:in `require' <internal:lib/rubygems/custom_require>:33:in `rescue in require' <internal:lib/rubygems/custom_require>:29:in `require' 
like image 916
David Waller Avatar asked Jun 13 '11 12:06

David Waller


1 Answers

It's the top level of a file i.e. whatever gets run when the file is required.
So if something fails during the setup of a library (for example some required file isn't found) it will show up in the stacktrace like that.

like image 65
Ninto Avatar answered Sep 18 '22 12:09

Ninto