检查ubuntu上安装了哪个版本的rubygems?


16

如何查看我在Ubuntu盒子上安装的rubygems版本?

Answers:


1

只是一个想法,列出已安装的软件包和grep来显示ruby或gems或其他内容:)

dpkg-获取选择


要求特定的包裹会更好吗?喜欢dpkg -l rubygems
ptman

如果您不知道包名怎么办?这可以工作:dpkg -l * ruby​​ *吗?

1
@ user123456 dpkg -l | grep ruby将在该实例中工作。
voretaq7 2012年

21

无论是gem -vgem --version将输出版本号。

了解更多信息:

$ gem -h
RubyGems is a sophisticated package manager for Ruby.  This is a
basic help message containing pointers to more information.

  Usage:
    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]

  Examples:
    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help platforms           show information about platforms
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 http://localhost:8808/
                                 with info about installed gems
  Further information:
    http://rubygems.rubyforge.org

我在另一个问题上看到您的gem应用程序已损坏。并且您已使用进行了更新gem update --system。在这种情况下,您可以查看/usr/lib/ruby/gems/1.8/gems/rubygems-update-x.x.x并获取最高值为xxx的目录

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.