Error: /bin/env: ruby: No such file or directory
Solution 1: It was a silly mistake. I have GIT BASH already installed on my system so i was trying to run this command on it. Upon using Command Prompt(cmd.exe) it started working.
Problem 2: Public Key : Permission Denied
Solution 2: Public Key created was not uploaded automatically to the Heroku server. I did it manually.
To generate a public key: > ssh-keygen -t rsa
To add a key to Heroku: > heroku keys:add
Problem 3: Unable to push my commits.(git push heroku master)
Error: Rails not detected.
I was uploading PHP project.
Solution 3: It was again a silly mistake. For pushing your commits your current directory must be the directory you cloned from server. I was running that command from parent directory. So upon changing to the cloned directory and after committing again, push started working.