Forum: Ruby on Rails Error : (undefined method `write')

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.
Roger H. (Guest)
on 2009-04-30 05:02
    Complete line from error inside SciTE :

test.rb:12: undefined method `write' for #<String:0x3a36d64>
(NoMethodError)

    Error results from this line :

google_data.to_xml.write($stdout, 1)

--------------------------------------------------------------------
... trying to use this Scrubyt sample script on WinXP:

require 'rubygems'
require 'scrubyt'

google_data = Scrubyt::Extractor.define do
  fetch          'http://www.google.com/ncr'
  fill_textfield 'q', 'ruby'
  submit

  result 'Ruby P.ming Language'
end

google_data.to_xml.write($stdout, 1)
Scrubyt::ResultDumper.print_statistics(google_data)
This topic is locked and can not be replied to.