How to install a specific version of a ruby gem?

使用命令行gem工具,如何安装特定版本的gem?


使用-v标志:

$ gem install fog -v 1.8

Use the --version parameter (shortcut -v ):

$ gem install rails -v 0.14.1

You can also use version comparators like >= or ~>

$ gem install rails -v '~> 0.14.0'

Or with newer versions of gem even:

$ gem install rails:0.14.4 rubyzip:'< 1'
…
Successfully installed rails-0.14.4
Successfully installed rubyzip-0.9.9

对于Ruby 1.9+使用冒号..

gem install sinatra:1.4.4 prawn:0.13.0
链接地址: http://www.djcxy.com/p/35932.html

上一篇: Rails rdoc Gem错误/腐败问题

下一篇: 如何安装特定版本的红宝石?