Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Practical customized yum Warehouse-parameters commonly used in gem commands

2025-02-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report