"No such file or directory - getcwd" error on rubygems on Mac Os Lion
This happened to me. It turned out I had deleted the folder I was running the command in.
I had that same issue.... running sudo gem update --system
fixed the problem... give it a try.
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.