# Htmldiff between 2 files

**URL:** <https://rubytalk.org/t/htmldiff-between-2-files/44013>\
**Category:** ruby-talk\
**Created:** [24 January 2008 10:14 UTC](https://rubytalk.org/t/htmldiff-between-2-files/44013 "2008-01-24T10:14:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Janus\_Woze](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@Janus\_Woze](https://rubytalk.org/u/Janus_Woze)\
**Post date:** [24 January 2008 10:14 UTC](https://rubytalk.org/t/htmldiff-between-2-files/44013/1 "2008-01-24T10:14:06Z")

</div>

Dear all,

I'm looking a existing ruby script that will allow me to create a html  
diff between 2 existing text files.

I already found similar scripts but what I need is to have 2 colons: on  
the left for the first file, on the right for the second file.  
Ideally you will have colors (green & red) to see the differences:  
\* added and removed lines  
\* change inside a line (word remove, spelling mistake,..)

The trac tool or the wikipedia historic interface functions are exactly  
what I need.

Does somebody already seen a script like that ?

My goal is to see differences between two configuration files from Cisco  
devices via a ruby on rails application.

Thanks in advance for your replies,

Best regards

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Mark\_Mcbride](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@Mark\_Mcbride](https://rubytalk.org/u/Mark_Mcbride)\
**Post date:** [5 November 2008 00:12 UTC](https://rubytalk.org/t/htmldiff-between-2-files/44013/2 "2008-11-05T00:12:02Z")

</div>

Janus,

I wrote this script. It should do what you're looking for:  
[http://markmcb.com/2008/11/04/ruby-on-rails-diff-text-to-html-ins-and-del/](http://markmcb.com/2008/11/04/ruby-on-rails-diff-text-to-html-ins-and-del/)

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Janus\_Woze](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@Janus\_Woze](https://rubytalk.org/u/Janus_Woze)\
**Post date:** [31 January 2009 10:45 UTC](https://rubytalk.org/t/htmldiff-between-2-files/44013/3 "2009-01-31T10:45:16Z")

</div>

Thank you a lot Mark !

It's very useful !

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
