# Rails tidy

**URL:** <https://www.ruby-forum.com/t/rails-tidy/106714>\
**Category:** Rails\
**Created:** [June 13, 2007, 3:33pm UTC](https://www.ruby-forum.com/t/rails-tidy/106714 "2007-06-13T15:33:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mark](https://www.ruby-forum.com/u/mark)\
**Post date:** [June 13, 2007, 3:33pm UTC](https://www.ruby-forum.com/t/rails-tidy/106714/1 "2007-06-13T15:33:01Z")

</div>

Hi,

I am looking at using Tidy to clean up some html, but having a few  
problems running it.

The gem seems to be installed ok,

But according to the rDoc I need to give the path of tidylib.so

e.g.  
Tidy.path = ‘/usr/lib/tidylib.so’

However this file does not seem to exist, any suggestions on what I may  
have missed?  
(using ms windows)

---

<div class="post-metadata">

**Author:** ![mark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mark](https://www.ruby-forum.com/u/mark)\
**Post date:** [June 13, 2007, 10:57pm UTC](https://www.ruby-forum.com/t/rails-tidy/106714/2 "2007-06-13T22:57:36Z")

</div>

> However this file does not seem to exist, any suggestions on what I may  
> have missed?  
> (using ms windows)

did you install tidy itself or just the gem? You’ll need both…

---

<div class="post-metadata">

**Author:** ![mark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mark](https://www.ruby-forum.com/u/mark)\
**Post date:** [June 13, 2007, 11:48pm UTC](https://www.ruby-forum.com/t/rails-tidy/106714/3 "2007-06-13T23:48:44Z")

</div>

You may need to point to Tidy.dll if you’re on Windows (Just a guess;  
I really don’t know…it depends on how they built it).

–Jeremy

On 6/13/07, MArk [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> e.g.

–  
[http://www.jeremymcanally.com/](http://www.jeremymcanally.com/)

My free Ruby e-book:  
[http://www.humblelittlerubybook.com/book/](http://www.humblelittlerubybook.com/book/)

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![mark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mark](https://www.ruby-forum.com/u/mark)\
**Post date:** [July 16, 2007, 10:29pm UTC](https://www.ruby-forum.com/t/rails-tidy/106714/4 "2007-07-16T22:29:12Z")

</div>

Hi Mark,

Did you ever get an answer to this? I’m running into the same issue on  
OS X.

Dan C.

---

<div class="post-metadata">

**Author:** ![mark](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@mark](https://www.ruby-forum.com/u/mark)\
**Post date:** [June 14, 2007, 5:41am UTC](https://www.ruby-forum.com/t/rails-tidy/106714/5 "2007-06-14T05:41:22Z")

</div>

MArk wrote:

> I am looking at using Tidy to clean up some html, but having a few  
> problems running it.
> 
> The gem seems to be installed ok,
> 
> But according to the rDoc I need to give the path of tidylib.so

I have 300 years experience in C and so files on Linux, and I couldn’t  
get  
that working either.

I only use Tidy in one place. When upgrading legacy HTML to RHTML, I  
Tidy it  
first, with the command line:

tidy -asxhtml -i -m myFile.html

That cleans up the style, so my assert\_xml (generally) works safely on  
it in  
tests.

Google for my street name and assert\_tidy for a great wrapper, to help  
you  
test legacy RHTML files that are not clean enough for assert\_xml.

–  
Phlip  
[Test Driven Ajax (on Rails) [Book]](http://www.oreilly.com/catalog/9780596510657/)  
“Test Driven Ajax (on Rails)”  
assert\_xpath, assert\_javascript, & assert\_ajax
