Fix the gemfile locating logic.