Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby Runtime Libraries

Reply
Thread Tools

Ruby Runtime Libraries

 
 
Robert Huber
Guest
Posts: n/a
 
      11-30-2010
is there a way to list the libraries a ruby script is loading when it
runs?

thanks...

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Scott Gonyea
Guest
Posts: n/a
 
      11-30-2010
You can use ruby -rtracer or work from within irb --tracer.

if you work from irb, using flyrb might prove handy when examining code.

Scott

On Nov 30, 2010, at 11:26 AM, Robert Huber wrote:

> is there a way to list the libraries a ruby script is loading when it
> runs?
>
> thanks...
>
> --
> Posted via http://www.ruby-forum.com/.
>



 
Reply With Quote
 
 
 
 
Robert Klemme
Guest
Posts: n/a
 
      11-30-2010
On 11/30/2010 08:26 PM, Robert Huber wrote:
> is there a way to list the libraries a ruby script is loading when it
> runs?


Place this somewhere after the initialization:

p $"
p $LOADED_FEATURES

If you want to execute more control you could do

def trace_load
a = $".dup
r = yield
p($".dup - a)
r
end

trace_load do
require 'your_lib'
end

Kind regards

robert
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
standard libraries don't behave like standard 'libraries' Sriram Srinivasan Python 13 11-12-2009 06:05 PM
[ANN] Ruby-Tk LIbraries Runtime Library 3.0 and Gestalt Items Arndt Roger Schneider Ruby 4 11-10-2009 02:34 PM
Using mandatory libraries (custom class loading vs. expanding libraries) Karsten Wutzke Java 21 06-29-2007 09:25 PM
Ruby must run in c:\ruby in order to find libraries (xp sp2) zenix Ruby 0 04-28-2007 03:55 PM
Resolve shared libraries location at runtime ? Apprentice C++ 2 03-28-2006 02:14 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57