RubyGems使用(基本命令)

RubyGems会自动处理Gem之间的依赖关系

gem install -v version gem_name

安装特定版本的gem_name

gem install -v ">2.0.0" cmdparse

安装版本大于2.0.0的cmdparse

gem install -v 1.0.5 cmdparse

安装版本为1.0.5的cmdparse

gem list --remote cmdparse

查看远端库上所有cmdparse包及其版本

gem update creditcard

更新creditcard包

gem update

更新系统上所有的包

gem uninstall cmdparse

卸载cmdparse包

gem uninstall cmdparse -v 2.0.2

卸载版本为2.0.2的cmdparse包