Add sorted gem list to environment and gemfile