From: Adam Penny Date: 2008-04-24T09:54:56+09:00 Subject: Dud require for Plist gem. Hi there, I'm sorry about this, I'm just working on my first ruby script which goes as follows: require 'Plist' require 'optparse' #Class for handling the plist file. class PlistHash def initialize(path) @path=path @plist_hash=Plist::parse_xml(@path) end def get_mac_by_host(host_name) mac=@plist_hash['serverMAC'][host_name] end def get_mac_by_printer(printer_name) host_name=@plist_hash['printers'][printer_name]['printerHost'] mac=@plist_hash['serverMAC'][host_name] end def get_broadcast_ip broadcast_ip=@plist_hash['broadcastIP'] end end plist=PlistHash.new('/Library/Preferences/com.apple.wopol.plist') opts=OptionParser.new opts.on("-h", "--host HOSTNAME", String) {|val| plist.get_mac_by_host(val)} opts.parse(ARGV) When I try to run this I get the following error: ruby PlistHash.rb -h PennyG5.local PlistHash.rb:1:in `require': no such file to load -- Plist (LoadError) from PlistHash.rb:1 Yet if I type require 'Plist' in irb it's accepted. What am I missing here. Thanks for your help people and many apologies if it's something really dumb. -- Posted via http://www.ruby-forum.com/.