Forum: Ruby on Rails xmlsimple warning

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ac2cbc3afe2a39ebf89db03c49dbddeb?d=identicon&s=25 ginty (Guest)
on 2008-11-07 01:54
(Received via mailing list)
Hi All,

Anyone know how to fix the below warnings which I get when I run most
if not all of the ./script executables, some googling reveals the odd
mention of it but I haven't seen a good fix for it.

It's not causing any functional issues for me (so far), just damn
annoying..

Thanks,
Stephen

stephen@glasgow:~/www/myproj$ ./script/server
/usr/lib/ruby/1.8/xmlsimple.rb:275: warning: already initialized
constant KNOWN_OPTIONS
/usr/lib/ruby/1.8/xmlsimple.rb:280: warning: already initialized
constant DEF_KEY_ATTRIBUTES
/usr/lib/ruby/1.8/xmlsimple.rb:281: warning: already initialized
constant DEF_ROOT_NAME
/usr/lib/ruby/1.8/xmlsimple.rb:282: warning: already initialized
constant DEF_CONTENT_KEY
/usr/lib/ruby/1.8/xmlsimple.rb:283: warning: already initialized
constant DEF_XML_DECLARATION
/usr/lib/ruby/1.8/xmlsimple.rb:284: warning: already initialized
constant DEF_ANONYMOUS_TAG
/usr/lib/ruby/1.8/xmlsimple.rb:285: warning: already initialized
constant DEF_FORCE_ARRAY
/usr/lib/ruby/1.8/xmlsimple.rb:286: warning: already initialized
constant DEF_INDENTATION
/usr/lib/ruby/1.8/xmlsimple.rb:287: warning: already initialized
constant DEF_KEY_TO_SYMBOL
=> Booting WEBrick...
F5e03c06ad87bb09726f2fb748c9ece2?d=identicon&s=25 Mathematician (Guest)
on 2008-11-11 11:13
(Received via mailing list)
I am also newbies for rails too.
I found an information at
http://www.unwin.org/ruby_on_rails/tips/xml_simple...

But this is not solve my problem too.
I tried to uninstall flickr but it also not solve.

Best try it first.
19c882975c747fa3968d59fcdb07f187?d=identicon&s=25 PhilW (Guest)
on 2008-11-29 12:18
(Received via mailing list)
On Nov 11, 5:29 am, Mathematician <karin.ma...@gmail.com> wrote:
> I am also newbies for rails too.
> I found an information 
athttp://www.unwin.org/ruby_on_rails/tips/xml_simple......
>
> But this is not solve my problem too.
> I tried to uninstall flickr but it also not solve.

I found the problem on my system to be slightly different than the one
described in the link. The
conflict was due to xmlsimple.rb being included as well as lib/
xmlsimple.rb which is nothing more
than a link to the original file.

The following script worked for me:

#!/bin/sh

cd /usr/lib/ruby/1.8
if [ -h lib/xmlsimple.rb ]
then
  mv lib/xmlsimple.rb lib/xmlsimple.rb.old
  mv xmlsimple.rb lib/.
  cat > xmlsimple.rb <<!
require 'lib/xmlsimple.rb'
!
else
  echo `pwd`/lib/xmlsimple.rb is not a link. Exiting.
fi
Ac2cbc3afe2a39ebf89db03c49dbddeb?d=identicon&s=25 ginty (Guest)
on 2009-01-21 03:50
(Received via mailing list)
Outstanding thanks for the replies guys!

Phil your script fixed it for me, cheers!
44bacf9ac0b5d250ed026edc36c202bb?d=identicon&s=25 Alberto (Guest)
on 2009-02-28 00:34
(Received via mailing list)
Thanks people! The script worked me just fine!
This topic is locked and can not be replied to.