0

Say I have the following bash script...

bin/my-script.sh

#!/usr/bin/env bash
echo "Hello world!"

And the following Rakefile...

namespace :dev do
    desc "Execute my- scripts"
    task :done do
        sh "bin/my-script.sh"
    end 
end

And I'm running rake dev:done through cmd in the root directory..

Why do I receive the following error?

> rake dev:done
bin/my-script.sh
rake aborted!
Command failed with status (127): [bin/my-script.sh...]
TheAuzzieJesus
  • 587
  • 9
  • 23
  • what happens when you run the script in the command line? – Greg Oct 12 '17 at 08:05
  • Exit code 127 means [the command was not found](https://stackoverflow.com/questions/1763156/127-return-code-from). It can also be caused if `my-script.sh` does not have execution capabilities. Try running `chmod +x my-script.sh`. – Aserre Oct 12 '17 at 08:19

0 Answers0