PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > errors with hawler gem on os x 10.5
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
errors with hawler gem on os x 10.5

Réponse
 
LinkBack Outils de la discussion
Vieux 18/06/2008, 03h57   #1
Pauli Price
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut errors with hawler gem on os x 10.5

I wrote this little website spidering script using hawler (sudo gem
install --source http://spoofed.org/files/hawler/ hawler) and got it
working on windows xp pro. I had to comment out some signal handling in
the gem code, but other than that, using it was uneventful.

Fast forward a few months - my xp laptop died and I purchased a new
macbook pro. Now the script that ran on XP won't run on mac os. I
haven't edited the gem files, as there was no need to remove the signal
handling.

Running on os x 10.5, I get the following error:

Connection to http://www.some-domain.com/ failed! -- getaddrinfo:
nodename nor servname provided, or not known

Not knowing where to start, I decided to run the gem's included tests.
But this time I get a different error, the following:

$ ./test/ts_all.rb
/test/ts_all.rb: line 3: syntax error near unexpected token `('
/test/ts_all.rb: line 3: `$:.unshift File.join(File.dirname(__FILE__),
"..", "lib")'


The contents of this file are:

# $Id: ts_all.rb 4 2008-03-02 04:47:09Z warchild $

$:.unshift File.join( File.dirname(__FILE__), "..", "test")
require 'ts_hawlee'
require 'ts_hawler'
require 'ts_hawlerer'

I've tried running it standing in the test directory as well - with the
same results.

Any suggestions for either the original or the test error?

Thanks!

Pauli
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 18/06/2008, 04h06   #2
Eric Hodel
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: errors with hawler gem on os x 10.5


On Jun 17, 2008, at 19:57 PM, Pauli Price wrote:

> I wrote this little website spidering script using hawler (sudo gem
> install --source http://spoofed.org/files/hawler/ hawler) and got it
> working on windows xp pro. I had to comment out some signal
> handling in
> the gem code, but other than that, using it was uneventful.
>
> Fast forward a few months - my xp laptop died and I purchased a new
> macbook pro. Now the script that ran on XP won't run on mac os. I
> haven't edited the gem files, as there was no need to remove the
> signal
> handling.
>
> Running on os x 10.5, I get the following error:
>
> Connection to http://www.some-domain.com/ failed! -- getaddrinfo:
> nodename nor servname provided, or not known
>
> Not knowing where to start, I decided to run the gem's included tests.
> But this time I get a different error, the following:
>
> $ ./test/ts_all.rb
> ./test/ts_all.rb: line 3: syntax error near unexpected token `('
> ./test/ts_all.rb: line 3: `$:.unshift
> File.join(File.dirname(__FILE__),
> "..", "lib")'
>
>
> The contents of this file are:
>
> # $Id: ts_all.rb 4 2008-03-02 04:47:09Z warchild $
>
> $:.unshift File.join( File.dirname(__FILE__), "..", "test")



There is no shebang, so the file was run with sh.

Try ruby test/test_all.rb.

  Réponse avec citation
Vieux 18/06/2008, 07h47   #3
Pauli Price
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: errors with hawler gem on os x 10.5

As expected, that did the trick.

Of course, all tests passed.

In other languages I'd step it through a debugger next.

Any pointers on debugging ruby scripts -- links to tutorial articles
very welcome.

Pauli



Eric Hodel wrote:
> There is no shebang, so the file was run with sh.
>
> Try ruby test/test_all.rb.


--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 18/06/2008, 14h42   #4
Pauli Price
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: errors with hawler gem on os x 10.5

Of course, a search of the forum was in order and I found this:

http://brian.maybeyoureinsane.net/bl...cs-screencast/



Pauli Price wrote:
> [asking about debugging technique]

--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h13.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,60828 seconds with 12 queries