How to start Tidy on WinXP?

D

Dan Kohn

Using the sample script that came with the Tidy library, I get the
following error:
ruby tidy.rb
../tidy.rb:2: uninitialized constant Tidy (NameError)
from c:/program
files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require__'
from c:/program
files/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in
`require'
from tidy.rb:1
Exit code: 1


I just need tidy.dll, not tidy.exe, right? How do I reference tidy?

require 'tidy'
Tidy.path = 'C:/Progra~1/tidy/bin/tidy.dll'

html = gets
xml = Tidy.open:)show_warnings=>true) do |tidy|
tidy.options.output_xml = true
puts tidy.options.show_warnings
xml = tidy.clean(html)
puts tidy.errors
puts tidy.diagnostics
xml
end
puts xml
 
M

Matt Mower

Using the sample script that came with the Tidy library, I get the
following error:

Your Tidy.path statement looks okay. I'm wondering whether this might
be a problem of having your script named 'tidy.rb' foxing the require
'tidy'?

M

--=20
Matt Mower :: http://matt.blogs.it/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top