From: Kaye Ng Date: 2011-11-05T21:26:27+09:00 Subject: Are there two kinds of 'require' ? I'm reading a tutorial and it has an example like this" require 'rubygems' require 'RedCloth' The tutorial says: "...the RubyGems library over-rides the require method and enables it to be used to load gems as if they were normal, local libraries." I don't know how it works. Is there a rubygems require and an ordinary require? I'm using 1.9.2 and I know *require 'rubygems'* is not necessary as RubyGems is loaded by default. But I still don't understand the logic behind the "over-rides the require method and enables it to be used to load gems as if they were normal, local libraries" part. 1. Does RedCloth have the .rb suffix? Is it different from any simple library I can make (e.g. string_extensions.rb) in that it has to use the rubygems version of 'require'? 2. Regarding the 'string_extensions.rb' , is RubyGems even necessary? That is, does the automatically-loaded RubyGems have any bearing on simple libraries that I may create? Or is it just for downloaded gems like RedCloth? Can someone please explain it to me in simple terms? Thank you. =) -- Posted via http://www.ruby-forum.com/.