From: polypus Date: 2006-05-10T12:54:40+09:00 Subject: command line rubygems and require given the file requires_foo.rb require 'foo' class ReqFoo end if foo is a gem, then i can run it by going: ruby -rubygems requires_foo.rb why can't i have a file requires_foo2.rb class ReqFoo end and go: ruby -rubygems -r foo requires_foo2.rb it's giving me a LoadError but maybe i'm approaching the problem wrong. what i'm doing is that i have a large file which is a tutorial to my lib in rdoc, and which is doing an :include: of my examples when need be, in order for my example code to be writen in only one place. the problem is that i don't want a whole lot of requires and shebangs and whatnot in the examples. is there a standard proceedure for this kind of thing? ideas/suggestions for an rdoc noob? my solution is just to have a little shell script in the examples directory which goes something like: ruby -rubygems -r foo example$1.rb but then there's the problem listed above. thanks, _c -- Posted via http://www.ruby-forum.com/.