Get head commit from Rails root rather than git

Using the git command was causing some memory usage errors, so rather than getting the current commit sha from git, we can just get the current folder (which is named as the current sha) from `Rails.root`, so we're using the Ruby porcess, rather than spinning up another process, which may have unintended consequences.