Status 127 is code for “command not found.” The problem was caused by my Rakefile which had a task called “updb” which I use to upload the current local copy of a database to production. And it looks like this:

The problem here is that even though the script is set to be executable, it’s still not in $PATH and even though ./scripts/updb.sh will actually run on the command line, we need to specify the shell to run and pass the script as an argument. The working task now looks like this: