If you're using bundler, bundle config can do this for you.