"No such file or directory - getcwd" error on rubygems on Mac Os Lion

Solution 1:

Maybe the current working directory of the shell that's used to start your heroku process doesn't exist (maybe removed by another process, as in my case), and therefore getcwd throws an error.

Solution 2:

This happened to me. It turned out I had deleted the folder I was running the command in.