chruby-exec RUBY [RUBYOPTS] -- COMMAND
RUBY Change current Ruby based on fuzzy matching of Ruby by name.
RUBYOPTS Additional optional arguments to pass to Ruby.
COMMAND Command to run under the selected Ruby.
-h, --help
-v, --version
Run a command with the selected Ruby version by correctly setting the appropriate environment variables.
https://github.com/postmodern/chruby/blob/master/README.md
Run the command gem update under JRuby:
$ chruby-exec jruby -- gem update
/opt/rubies Primary default Ruby install location.
~/.rubies/ Secondary default Ruby install location.
/etc/profile.d/chruby.sh Application environment settings for chruby.
~/.gem/$ruby/$version Default gem install location.
PATH Updates the PATH environment variable to include Rubies and RubyGems bin/ directories.
GEM_HOME Default repository location for gem installation.
GEM_PATH A colon-separated list of gem repository directories.
GEM_ROOT
RUBY_ROOT
RUBY_ENGINE Name of Ruby implementation.
RUBY_VERSION Ruby version number.
RUBYOPT Optionally set if additional Ruby options are given.
Postmodern postmodern.mod3@gmail.com.
chruby(1), ruby(1), gem(1)