On Tue, Dec 17, 2013 at 6:12 PM, Peter Bailey <lists / ruby-forum.com> wrote:
> Hello,
> I just rebuilt my Mac, with Ruby. I'm getting these what I think are
> very primitive errors when I try to run one of my scripts locally.
>
> pb4072imac:~ peterbailey$ checkorca dy3242g1
> /scripts/checkorca.rb: line 2: require: command not found
> /scripts/checkorca.rb: line 4: require: command not found
> /scripts/checkorca.rb: line 6: orcafile: command not found
> host: couldn't get address for 'http://ps2000-graphics-prod.bna.com':
> not found
> /scripts/checkorca.rb: line 10: clnt: command not found
> /scripts/checkorca.rb: line 11: syntax error near unexpected token
> `nil,'
> /scripts/checkorca.rb: line 11: `clnt.set_auth(nil, 'production',
> 'prod')'
>
> What is it complaining about "require?" Yeh, I've got "require" there at
> the top. But, I need it there.
> And, why can't it find the address of that URL?

Hi,

I don't work with a Mac, so take this with a grain of salt: it looks
like instead of running the script with the Ruby interpreter you are
running it as if it were a shell script, hence all the "command not
found" errors, cause the shell can't find those commands. Do you have
an appropriate shebang line (not sure how that would look like in a
Mac):

something like:

#!/bin/env ruby

Otherwise you could try calling ruby directly:

$ ruby checkorca.rb dy3242g1

Jesus.