There is a program, like this: #! /usr/bin/env ruby #... require 'getoptlong' #... However, the error message given is: ruby/unix/mkdir.rb:13:in `require': No such file to load -- getoptlong (LoadError) from ruby/unix/mkdir.rb:13 I tried to print out the loading paths: /usr/local/ruby/l.6.8/lib/ruby/site_ruby/1.6 /usr/local/ruby/l.6.8/lib/ruby/site_ruby/1.6/i686-linux /usr/local/ruby/l.6.8/lib/ruby/site_ruby /usr/local/ruby/l.6.8/lib/ruby/1.6 /usr/local/ruby/l.6.8/lib/ruby/1.6/i686-linux .. There seems to be nothing wrong with the loading paths and the getoptlong.rb is in /usr/local/ruby/l.6.8/lib/ruby/1.6 . Really confused. Can someone expert help? Thanks in advance.