Forum: Ruby HTMLDiff for jruby and ruby

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.
Virendra N. (Guest)
on 2009-05-22 13:17
hello there

from past few days iam trying to find out a gem that can compare the
difference between two html file. i have tried to install
myobie-htmldiff gem but the install didnt work out properly an it gave
me error
ERROR:  could not find gem myobie-htmldiff locally or in a repository

Note:- i have followed all the steps that were mention in the github
myobie-htmldiff home page

i have also tried gem xhtmldiff but its seem to give me weird error
while taking the difference between the two html file
like
when i tried this
 XHTMLDiff.diff(first_file,second_file)

ArgumentError: both arguments must be equal or both be elements. a is
String and b is String

i wish somebody out there can help me out

 Thank anyway
Brian C. (Guest)
on 2009-05-22 14:01
Virendra N. wrote:
> from past few days iam trying to find out a gem that can compare the
> difference between two html file. i have tried to install
> myobie-htmldiff gem but the install didnt work out properly an it gave
> me error
> ERROR:  could not find gem myobie-htmldiff locally or in a repository

Looks like github hasn't built the gem. There was a bug which was
recently fixed which was preventing gems being built. You can ask the
author to bump the gem version to force a rebuild, or you can build and
install the gem yourself:

  git clone git://github.com/myobie/htmldiff.git
  cd htmldiff
  gem build htmldiff.gemspec
  sudo gem install htmldiff-0.0.1.gem

If you don't have git available, then instead of 'git clone' just
download a tar or zip of the project (click the 'download' link on the
github page)
Virendra N. (Guest)
on 2009-05-22 14:25
Brian C. wrote:
> Virendra N. wrote:
>> from past few days iam trying to find out a gem that can compare the
>> difference between two html file. i have tried to install
>> myobie-htmldiff gem but the install didnt work out properly an it gave
>> me error
>> ERROR:  could not find gem myobie-htmldiff locally or in a repository
>
> Looks like github hasn't built the gem. There was a bug which was
> recently fixed which was preventing gems being built. You can ask the
> author to bump the gem version to force a rebuild, or you can build and
> install the gem yourself:
>
>   git clone git://github.com/myobie/htmldiff.git
>   cd htmldiff
>   gem build htmldiff.gemspec
>   sudo gem install htmldiff-0.0.1.gem
>
> If you don't have git available, then instead of 'git clone' just
> download a tar or zip of the project (click the 'download' link on the
> github page)

i followed your step but when iam trying to do require "htmldiff" its
give me error like that says

' LoadError: no such file to load -- htmldiff'
Pieter V. (Guest)
on 2009-05-22 18:33
(Received via mailing list)
This might seem oddly self-serving, but you might look into the Differ
gem.

http://github.com/pvande/differ

While not designed to diff HTML specifically, that's something that it
could most probably be set up to do.  Consider giving it a try.

(Full disclosure: Yeah, it's mine.)

On Fri, May 22, 2009 at 3:25 AM, Virendra N.
Martin DeMello (Guest)
on 2009-05-22 19:09
(Received via mailing list)
On Fri, May 22, 2009 at 8:02 PM, Pieter V. 
<removed_email_address@domain.invalid> wrote:
> This might seem oddly self-serving, but you might look into the Differ gem.
>
> http://github.com/pvande/differ
>
> While not designed to diff HTML specifically, that's something that it
> could most probably be set up to do.  Consider giving it a try.

That's a string differ. A proper html differ needs to be aware of the
tree structure - it's a different problem.

martin
Pieter V. (Guest)
on 2009-05-22 19:32
(Received via mailing list)
Pardon my confusion; htmldiff appears to be a string differ (with HTML
output) as well.
This topic is locked and can not be replied to.