Trying do a disqus import, hit with superclass mismatch for class Attribute error


(Quintin Par) #1

Trying to do a disqus comments import

root@ss-app:/var/www/discourse/script/import_scripts# RAILS_ENV=production ruby disqus.rb --file=/tmp/disqus-export.xml --dry_run

and I am hit with this error

root@ss-app:/var/www/discourse/script/import_scripts# RAILS_ENV=production ruby disqus.rb --file=/tmp/disqus-export1.xml --dry_run
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::LIBXML_VERSION
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::LIBXML_PARSER_VERSION
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::NOKOGIRI_USE_PACKAGED_LIBRARIES
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::NOKOGIRI_LIBXML2_PATH
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::NOKOGIRI_LIBXSLT_PATH
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::NOKOGIRI_LIBXML2_PATCHES
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::NOKOGIRI_LIBXSLT_PATCHES
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::LIBXML_ICONV_ENABLED
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::XML::EntityDecl::INTERNAL_GENERAL
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_PARSED
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_UNPARSED
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::XML::EntityDecl::EXTERNAL_PARAMETER
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/nokogiri.so: warning: already initialized constant Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/version.rb:3: warning: already initialized constant Nokogiri::VERSION
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/version.rb:3: warning: previous definition of VERSION was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/version.rb:100: warning: already initialized constant Nokogiri::VERSION_INFO
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/version.rb:100: warning: previous definition of VERSION_INFO was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:29: warning: already initialized constant Nokogiri::XML::ParseOptions::STRICT
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:29: warning: previous definition of STRICT was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:31: warning: already initialized constant Nokogiri::XML::ParseOptions::RECOVER
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:31: warning: previous definition of RECOVER was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:33: warning: already initialized constant Nokogiri::XML::ParseOptions::NOENT
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:33: warning: previous definition of NOENT was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:35: warning: already initialized constant Nokogiri::XML::ParseOptions::DTDLOAD
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:35: warning: previous definition of DTDLOAD was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:37: warning: already initialized constant Nokogiri::XML::ParseOptions::DTDATTR
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:37: warning: previous definition of DTDATTR was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:39: warning: already initialized constant Nokogiri::XML::ParseOptions::DTDVALID
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:39: warning: previous definition of DTDVALID was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:41: warning: already initialized constant Nokogiri::XML::ParseOptions::NOERROR
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:41: warning: previous definition of NOERROR was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:43: warning: already initialized constant Nokogiri::XML::ParseOptions::NOWARNING
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:43: warning: previous definition of NOWARNING was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:45: warning: already initialized constant Nokogiri::XML::ParseOptions::PEDANTIC
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:45: warning: previous definition of PEDANTIC was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:47: warning: already initialized constant Nokogiri::XML::ParseOptions::NOBLANKS
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:47: warning: previous definition of NOBLANKS was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:49: warning: already initialized constant Nokogiri::XML::ParseOptions::SAX1
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:49: warning: previous definition of SAX1 was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:51: warning: already initialized constant Nokogiri::XML::ParseOptions::XINCLUDE
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:51: warning: previous definition of XINCLUDE was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:53: warning: already initialized constant Nokogiri::XML::ParseOptions::NONET
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:53: warning: previous definition of NONET was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:55: warning: already initialized constant Nokogiri::XML::ParseOptions::NODICT
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:55: warning: previous definition of NODICT was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:57: warning: already initialized constant Nokogiri::XML::ParseOptions::NSCLEAN
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:57: warning: previous definition of NSCLEAN was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:59: warning: already initialized constant Nokogiri::XML::ParseOptions::NOCDATA
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:59: warning: previous definition of NOCDATA was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:61: warning: already initialized constant Nokogiri::XML::ParseOptions::NOXINCNODE
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:61: warning: previous definition of NOXINCNODE was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:63: warning: already initialized constant Nokogiri::XML::ParseOptions::COMPACT
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:63: warning: previous definition of COMPACT was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:65: warning: already initialized constant Nokogiri::XML::ParseOptions::OLD10
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:65: warning: previous definition of OLD10 was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:67: warning: already initialized constant Nokogiri::XML::ParseOptions::NOBASEFIX
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:67: warning: previous definition of NOBASEFIX was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:69: warning: already initialized constant Nokogiri::XML::ParseOptions::HUGE
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:69: warning: previous definition of HUGE was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:72: warning: already initialized constant Nokogiri::XML::ParseOptions::DEFAULT_XML
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:72: warning: previous definition of DEFAULT_XML was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:74: warning: already initialized constant Nokogiri::XML::ParseOptions::DEFAULT_HTML
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:74: warning: previous definition of DEFAULT_HTML was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:33:in `<class:Parser>': superclass mismatch for class Attribute (TypeError)
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:32:in `<module:SAX>'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:3:in `<module:XML>'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:2:in `<module:Nokogiri>'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:1:in `<top (required)>'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax.rb:3:in `require'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax.rb:3:in `<top (required)>'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml.rb:3:in `require'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml.rb:3:in `<top (required)>'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:36:in `require'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:36:in `<top (required)>'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `require'
	from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `<top (required)>'

what could be the issue?


How do I tag a topic in meta.discourse.org?
(Régis Hanol) #3

What does the /tmp/disqus-export.xml file look like? Just copy/past the first 10 lines.


(Quintin Par) #4

Thanks so much for helping out. I was close to pulling my hair.

Funny thing is, I get this error even without providing the file path. i.e.

root@ss-app:/var/www/discourse# pwd
/var/www/discourse
root@ss-app:/var/www/discourse# RAILS_ENV=production ruby script/import_scripts/disqus.rb 
…..
…..
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:37: warning: already initialized constant Nokogiri::XML::ParseOptions::DTDATTR
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:37: warning: previous definition of DTDATTR was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:39: warning: already initialized constant Nokogiri::XML::ParseOptions::DTDVALID
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:39: warning: previous definition of DTDVALID was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:41: warning: already initialized constant Nokogiri::XML::ParseOptions::NOERROR
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:41: warning: previous definition of NOERROR was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:43: warning: already initialized constant Nokogiri::XML::ParseOptions::NOWARNING
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:43: warning: previous definition of NOWARNING was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:45: warning: already initialized constant Nokogiri::XML::ParseOptions::PEDANTIC
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:45: warning: previous definition of PEDANTIC was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:47: warning: already initialized constant Nokogiri::XML::ParseOptions::NOBLANKS
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:47: warning: previous definition of NOBLANKS was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:49: warning: already initialized constant Nokogiri::XML::ParseOptions::SAX1
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:49: warning: previous definition of SAX1 was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:51: warning: already initialized constant Nokogiri::XML::ParseOptions::XINCLUDE
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:51: warning: previous definition of XINCLUDE was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:53: warning: already initialized constant Nokogiri::XML::ParseOptions::NONET
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:53: warning: previous definition of NONET was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:55: warning: already initialized constant Nokogiri::XML::ParseOptions::NODICT
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:55: warning: previous definition of NODICT was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:57: warning: already initialized constant Nokogiri::XML::ParseOptions::NSCLEAN
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:57: warning: previous definition of NSCLEAN was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:59: warning: already initialized constant Nokogiri::XML::ParseOptions::NOCDATA
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:59: warning: previous definition of NOCDATA was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:61: warning: already initialized constant Nokogiri::XML::ParseOptions::NOXINCNODE
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:61: warning: previous definition of NOXINCNODE was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:63: warning: already initialized constant Nokogiri::XML::ParseOptions::COMPACT
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:63: warning: previous definition of COMPACT was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:65: warning: already initialized constant Nokogiri::XML::ParseOptions::OLD10
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:65: warning: previous definition of OLD10 was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:67: warning: already initialized constant Nokogiri::XML::ParseOptions::NOBASEFIX
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:67: warning: previous definition of NOBASEFIX was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:69: warning: already initialized constant Nokogiri::XML::ParseOptions::HUGE
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:69: warning: previous definition of HUGE was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:72: warning: already initialized constant Nokogiri::XML::ParseOptions::DEFAULT_XML
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:72: warning: previous definition of DEFAULT_XML was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:74: warning: already initialized constant Nokogiri::XML::ParseOptions::DEFAULT_HTML
/usr/local/lib/ruby/gems/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/parse_options.rb:74: warning: previous definition of DEFAULT_HTML was here
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:33:in `<class:Parser>': superclass mismatch for class Attribute (TypeError)
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:32:in `<module:SAX>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:3:in `<module:XML>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:2:in `<module:Nokogiri>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax/parser.rb:1:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax.rb:3:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml/sax.rb:3:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml.rb:3:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri/xml.rb:3:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:36:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/nokogiri-1.8.1/lib/nokogiri.rb:36:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/loofah-2.1.1/lib/loofah.rb:3:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rails-html-sanitizer-1.0.3/lib/rails-html-sanitizer.rb:2:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/sanitize_helper.rb:2:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/sanitize_helper.rb:2:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/text_helper.rb:32:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/text_helper.rb:32:in `<module:TextHelper>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/text_helper.rb:29:in `<module:Helpers>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/text_helper.rb:6:in `<module:ActionView>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/text_helper.rb:4:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/form_tag_helper.rb:18:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/form_tag_helper.rb:18:in `<module:FormTagHelper>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/form_tag_helper.rb:14:in `<module:Helpers>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/form_tag_helper.rb:8:in `<module:ActionView>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/form_tag_helper.rb:6:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/form_helper.rb:4:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers/form_helper.rb:4:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers.rb:50:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers.rb:50:in `<module:Helpers>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers.rb:4:in `<module:ActionView>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionview-5.1.4/lib/action_view/helpers.rb:3:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/context.rb:7:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/context.rb:7:in `<module:Context>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/context.rb:6:in `<module:Rails>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/context.rb:5:in `<module:Sprockets>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/context.rb:4:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/railtie.rb:7:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/sprockets-rails-3.2.0/lib/sprockets/railtie.rb:7:in `<top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/all.rb:14:in `require'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/all.rb:14:in `block in <top (required)>'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/all.rb:12:in `each'
        from /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/railties-5.1.4/lib/rails/all.rb:12:in `<top (required)>'
        from /var/www/discourse/config/application.rb:2:in `require'
        from /var/www/discourse/config/application.rb:2:in `<top (required)>'
        from /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /var/www/discourse/config/environment.rb:2:in `<top (required)>'
        from /var/www/discourse/script/import_scripts/base.rb:14:in `require_relative'
        from /var/www/discourse/script/import_scripts/base.rb:14:in `<top (required)>'
        from /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from script/import_scripts/disqus.rb:3:in `<main>'

Nevertheless, here are the top 20 lines

root@ss-app:/tmp# sed -n -e '1,20p' disqus-export.xml 
<?xml version="1.0" encoding="utf-8"?>
<disqus xmlns="http://disqus.com" xmlns:dsq="http://disqus.com/disqus-internals" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://disqus.com/api/schemas/1.0/disqus.xsd http://disqus.com/api/schemas/1.0/disqus-internals.xsd">
<category dsq:id="7345180">
<forum>https-name-com</forum>
<title>General</title>
<isDefault>true</isDefault>
</category>
<thread dsq:id="6275518016">
<id />
<forum>https-www-name-com</forum>
<category dsq:id="7345180" />
<link>https://www.name.com/tea-recipe</link>
<title>Tea</title>
<message />
<createdAt>2013-06-15T10:30:49Z</createdAt>
<author>
<email>email@gmail.com</email>
<name>Name Redacted</name>
<isAnonymous>false</isAnonymous>
<username>disqus_IU5cREKDJ4</username>

(Quintin Par) #5

Not a great programmer but I ended up adding

require 'rubygems'
require 'bundler/setup'

to the start of


solved the issue.