# Repost : Trouble with Error: "..undefined method \`write'.."

**URL:** <https://www.ruby-forum.com/t/repost-trouble-with-error-undefined-method-write/166843>\
**Category:** Ruby\
**Created:** [April 30, 2009, 3:12am UTC](https://www.ruby-forum.com/t/repost-trouble-with-error-undefined-method-write/166843 "2009-04-30T03:12:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![roger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c0e974/32.png) [@roger](https://www.ruby-forum.com/u/roger)\
**Post date:** [April 30, 2009, 3:12am UTC](https://www.ruby-forum.com/t/repost-trouble-with-error-undefined-method-write/166843/1 "2009-04-30T03:12:40Z")

</div>

The 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 ‘[Google](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)

Any help would be appreciated. Does anyone know of an up to  
date tutorial on Scrubyt? Thanks in advance
