In my Ruby program, I'm trying to lazy-load a library (crack for the curious).
If I do this:
require 'rubygems'
require 'crack'
Everything is working fine. However, when I try this:
require 'rubygems'
autoload :Crack, 'crack'
A LoadError is raised. (no such file to load -- crack)
Why is this error being raised? Is it because 'crack' (and therefore my other user-installed gems) are not in my $LOAD_PATH?
edit:
Furthermore, autoload
does work with the Standard Library:
autoload :Yaml, 'yaml'
works fine, and raises no errors.