复制内容到剪贴板
代码:
E:\>gem help install
Usage: gem install GEMNAME [GEMNAME ...] [options] -- --build-flags [options]
Options:
--platform PLATFORM Specify the platform of gem to install
-v, --version VERSION Specify version of gem to install
Install/Update Options:
-i, --install-dir DIR Gem repository directory to get installed
gems
-d, --[no-]rdoc Generate RDoc documentation for the gem on
install
--[no-]ri Generate RI documentation for the gem on
install
-E, --env-shebang Rewrite the shebang line on installed
scripts to use /usr/bin/env
-f, --[no-]force Force gem to install, bypassing dependency
checks
-t, --[no-]test Run unit tests prior to installation
-w, --[no-]wrappers Use bin wrappers for executables
Not available on dosish platforms
-P, --trust-policy POLICY Specify gem trust policy
--ignore-dependencies Do not install any required dependent gems
-y, --include-dependencies Unconditionally install the required
dependent gems
--[no-]format-executable Make installed executable names match ruby.
If ruby is ruby18, foo_exec will be
foo_exec18
Local/Remote Options:
-l, --local Restrict operations to the LOCAL domain
-r, --remote Restrict operations to the REMOTE domain
-b, --both Allow LOCAL and REMOTE operations
-B, --bulk-threshold COUNT Threshold for switching to bulk
synchronization (default 1000)
--source URL Use URL as the remote source for gems
-p, --[no-]http-proxy [URL] Use HTTP proxy for remote operations
-u, --[no-]update-sources Update local source cache
Common Options:
-h, --help Get help on this command
-V, --[no-]verbose Set the verbose level of output
-q, --quiet Silence commands
--config-file FILE Use this config file instead of default
--backtrace Show stack backtrace on errors
--debug Turn on Ruby debugging
Arguments:
GEMNAME name of gem to install
Summary:
Install a gem into the local repository
Defaults:
--both --version '>= 0' --rdoc --ri --no-force
--no-test --install-dir D:/ruby/lib/ruby/gems/1.8gem install 默认安装最新版本,你可以使用--version选项安装指定的版本,当然包括1.2