i try to use the gem plist by :
#!/usr/bin/env ruby
require ‘plist’
plist=Plist.parse_xml(my_info_path)
and i get :
NameError: uninitialized constant Plist
how do i initialize this constant, i thought it was done into “plist.rb”
starting with :
class Plist
def Plist::parse_xml( filename )
listener = Listener.new
#parser = REXML::Parsers::StreamParser.new(File.new(filename),
listener)
parser = StreamParser.new(filename, listener)
parser.parse
listener.result
end
i’ve allready tested :
plist=Plist::parse_xml(my_info_path)
with the same error message ???
Une bévue [email protected] wrote:
i’ve allready tested :
plist=Plist::parse_xml(my_info_path)
with the same error message ???
also i should say i have the same prob running “test_plist.rb” included
in the gem package of Plist.
also, i should say i was unable to update Plist and have an old version
: 1…
Une bévue [email protected] wrote:
also i should say i have the same prob running “test_plist.rb” included
in the gem package of Plist.
in fact, this has nothing to do with ruby nor ruby_gems, it comes from
my editor (TextMate) not understanding (?) some env vars…
Une bévue wrote:
Une bévue [email protected] wrote:
also i should say i have the same prob running “test_plist.rb” included
in the gem package of Plist.
Try
require ‘rubygems’
require_gem ‘plist’
Clayton
Le 14 juil. 06 à 16:00, Clayton Smith a écrit :
require ‘rubygems’
require_gem ‘plist’
thanks very much, it works fine.
in fact this prob comes from interaction of a plist module used by my
text writter (TextMate) and gems one…
Yvon