Ruby Set Up PostgreSQL in Production

RAILS_ENV=production bin/rails db:setup When running the command, I get an Error: -bash: bin/rails: Permission denied

following this video, when I try to create de database using this command: RAILS_ENV=production bin/rails db:setup, I get an error: -bin: bin/rails:Permission denied. any ideas on what could be?