Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
autoload with rubygems?
matt
10/14/2008 5:42:00 PM
I'm sure this has been asked before but I couldn't find an actual
answer.
This works:
require 'rubygems'
require 'ruby-prof'
RubyProf.start
This doesn't:
require 'rubygems'
autoload(:RubyProf, 'ruby-prof')
RubyProf.start #=> LoadError: no such file to load - ruby-prof
What am I doing wrong? I'd like to "weak-link" certain gems so that my
users don't have to install a gem unless they encounter the part of my
code that actually uses it. Thx - m.
--
matt neuburg, phd = matt@tidbits.com,
http://www.tidbits...
Leopard -
http://www.takecontrolbooks.com/leopard-custom...
AppleScript -
http://www.amazon.com/gp/product/...
Read TidBITS! It's free and smart.
http://www.t...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
autoload with rubygems?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password