1

When I do just script/runner it gives me -bash: script/runner: Permission denied

When I do sudo script/runner it gives me sudo: script/runner: command not found

It only works when I do ruby script/runner. Why? Everywhere else I see people just run script/runner without the ruby in front of it... Is there a "fix" for this? It's causing my javan-whenever generated crontab to fail on Permission denied because it just runs script/runner without ruby...

Steven Ou
  • 393
  • 2
  • 13

2 Answers2

8

It sounds like the "execute" permission bit is not set on your script/runner file. If that bit is not set, the unix shells will not try to execute it.

chmod +x script/runner can be used to set it. man chmod for more details on the chmod command.

jsegal
  • 1,281
  • 7
  • 6
3

just do this

chmod +x script/runner

and it would run. It basically makes it a executable.

use

man chmod

to get more details

Rishav Rastogi
  • 15,484
  • 3
  • 42
  • 47
  • oh that's great!! :D now a tack-on question... i'm using capistrano to deploy... do i need to add `chmod +x script/runner` as part of my deploy process or can i, for example, do that on the repository, or something? thanks! – Steven Ou Sep 07 '10 at 22:28
  • you create custom tasks in cucumber to do that. – Rishav Rastogi Sep 07 '10 at 22:29