# Errors with hawler gem on os x 10.5

**URL:** <https://www.ruby-forum.com/t/errors-with-hawler-gem-on-os-x-10-5/140738>\
**Category:** Ruby\
**Created:** [June 18, 2008, 4:58am UTC](https://www.ruby-forum.com/t/errors-with-hawler-gem-on-os-x-10-5/140738 "2008-06-18T04:58:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marfarma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@marfarma](https://www.ruby-forum.com/u/marfarma)\
**Post date:** [June 18, 2008, 4:58am UTC](https://www.ruby-forum.com/t/errors-with-hawler-gem-on-os-x-10-5/140738/1 "2008-06-18T04:58:44Z")

</div>

I wrote this little website spidering script using hawler (sudo gem  
install --source [http://spoofed.org/files/hawler/](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/](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\_hawlerhelper’

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

---

<div class="post-metadata">

**Author:** ![marfarma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@marfarma](https://www.ruby-forum.com/u/marfarma)\
**Post date:** [June 18, 2008, 5:08am UTC](https://www.ruby-forum.com/t/errors-with-hawler-gem-on-os-x-10-5/140738/2 "2008-06-18T05:08:43Z")

</div>

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

> handling.  
> ./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.

---

<div class="post-metadata">

**Author:** ![marfarma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@marfarma](https://www.ruby-forum.com/u/marfarma)\
**Post date:** [June 18, 2008, 3:43pm UTC](https://www.ruby-forum.com/t/errors-with-hawler-gem-on-os-x-10-5/140738/3 "2008-06-18T15:43:49Z")

</div>

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

[http://brian.maybeyoureinsane.net/blog/2007/05/07/ruby-debug-basics-screencast/](http://brian.maybeyoureinsane.net/blog/2007/05/07/ruby-debug-basics-screencast/)

Pauli Price wrote:

> [asking about debugging technique]

---

<div class="post-metadata">

**Author:** ![marfarma](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a3d4f5/32.png) [@marfarma](https://www.ruby-forum.com/u/marfarma)\
**Post date:** [June 18, 2008, 8:48am UTC](https://www.ruby-forum.com/t/errors-with-hawler-gem-on-os-x-10-5/140738/4 "2008-06-18T08:48:42Z")

</div>

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 H. wrote:

> There is no shebang, so the file was run with sh.
> 
> Try ruby test/test\_all.rb.
