Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Practical customized yum Warehouse-parameters commonly used in gem commands

Shulou Source: shulou.com Published: 2022-06-01 06:05:06 10月04日 Update

Use of gem related commands

1. Show help and version of gem

Gem-h/--help

# display help from gem

Gem-v /-- version

# display the version number of gem

two。 List all available software for remote libraries

Gem query-remote

# short command: gem Q-r

You can see a detailed list of all the software on the remote host.

3. Find specific software on the remote host

Gem query-remote-name-matches doom

# short command: gem Q-rn doom

You will see a detailed list of matches to doom.

Gem list-remote-d

# list the remotely installed gems with the subcommand list

4.1 install a remote software

Gem install-remote progressbar

# short command: gem I-r progressbar-y

Remotely install progressbar to your host,-y means unconditional installation of dependency packages

Gem install rails-remote

# install rails packages from a remote server, where rails can be replaced with any of the packages shown in gem list-remote-d

4.2 install a specific version of the software

Gem ins-r progressbar-0.0.3

Install version 0.0.3 of progressbar

Gem ins-r progressbar-- version'> 0.0.1'

The latest version of progressbar greater than 0.0.1 will be installed

5. View an installed software

Gem specification progressbar

# short command: gem spec progressbar

You will see details about the installed package progressbar.

6. Uninstall a software

Gem uninstall progressbar

Progressbar is uninstalled

7.1 list all installed software

Gem query-local

# short command: 'gem Q-l'

7.2 View one of the installed software

Gem query-local-name-matches doom

# short command: 'gem Q-ln doom'

Or: gem list-- local

7.3 installation methods that need to be noticed

Gem ins rake

The local installation will be tried first, and if not available locally, it will be downloaded remotely.

Gem list-b ^ C

List local and remote software that starts with C

8. Browse all installed software and their documentation

Gem_server

A web server is generated and http://localhost:8808 is opened

You can see a html listing the information you need in detail.

9. Use Profil

Gem:-gen-rdoc-run-tests

If you want to always generate documentation and run unit tests after installing the software, you can write the relevant commands in the configuration file, the configuration file name is .gemrc, in the home directory.

10. Build the gem package

Gem build package.gemspec

# using the bulid subcommand to build gem packages

Tags: Software commands versions hosts files information documents servers help services generation configuration unit beginning meaning file name method directory software package try Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Linux vpn MySQL Shulou Technology