Use LaunchControl to run pg_dump in a ruby file Using Mac OSX 10.12.5, I have a ruby file with the following contents

#!/usr/bin/env ruby
Dir.chdir('/Users/my_files') do
  system("pg_dump -Fc --no-acl --no-owner -h localhost -U MyName development &gt; backup_file.dump")
end


it works if I run it from the command line, but if I run it from LaunchControl I get the following error:

sh: pg_dump: command not found


How do I fix this?
Thanks to klanomath's comment, the problem is that I am not putting the full file path to pg_dump.

pg_dump is a utility of postgresql which was installed using homebrew. So in my case I did brew info postgresql which told me the path to postgresql.  In the bin directory I found pgdump.

I also put in the full path to where I wanted backup_file saved. This was found by changing to that directory and typing pwd.