Use command param $ jruby -S gem install --http-proxy http://proxy.server:8080 <gem_name> Use .gemrc file (see http://docs.rubygems.org/read/chapter/11)