From: yermej Date: 2007-11-21T00:00:01+09:00 Subject: Re: require functionality On Nov 20, 5:36 am, Junkone wrote: > hello > can i verify if a library is loaded before doing a require 'library'. > if so how. > thanks in advance By "if a library is loaded", do you mean if a library exists on the system? If that's what you're looking for, it's probably easiest to wrap the require in a begin/rescue/end, catch the LoadError which is raised if the library doesn't exist, and then do what needs to be done. begin require "optional_library" rescue LoadError puts "couldn't find optional_library, continuing without it" end