Explanation of gem commands in Ruby learning notes

Source: Internet
Author: User

Ruby-v # view the ruby VERSION ruby-e '''require "watir"; puts Watir: IE: version'' # view the watir VERSION

Rvm list known # list known ruby versions

Rvm install 1.9.3

Rvm use 1.9.3 | rvm use system

Rvm use 1.9.3 -- default

Rvm list # list local ruby versions

Rvm remove 1.9.2

For details, see RVM practical guide https://ruby-china.org/wiki/rvm-guide.

Gem-v # gem version

Gem source # gem Resources

Gem sources-a url | gem sources-r url # add or delete a configuration source from gem

Gem update # update all packages

Gem update -- system # update RubyGems Software

Gem install rake # install rake from a local or remote server

Gem install rake -- remote # install rake from a remote server

Gem install watir-v (or -- version) 1.6.2 # specify

Gem uninstall rake # uninstall the rake package

Gem list d # list local packages with d Headers

Gem query-n'' [0-9] ''-- local # search for packages with numbers on the local device.

Gem search log -- both # search for packages containing log strings from local and remote servers

Gem search log -- remoter # search for packages containing log strings only on the remote server

Gem search-r log # search for packages containing log strings only on the remote server

Gem help # Wake-up help

Gem help install # list the install Command help

Gem help examples # list some examples of using the gem command

Gem build rake. gemspec # compile rake. gemspec into rake. gem

Gem check-v pkg/rake-0.4.0.gem # check whether rake is valid

Gem cleanup # Clear old versions of all packages and keep the latest version

Gem contents rake # display the files contained in the rake package

Gem dependency rails-v 0.10.1 # list packages that are mutually dependent on rails

Gem environment # view the gem environment

Related Article
Large-Scale Price Reduction
  • 59% Max. and 23% Avg.
  • Price Reduction for Core Products
  • Price Reduction in Multiple Regions
undefined. /
Connect with us on Discord
  • Secure, anonymous group chat without disturbance
  • Stay updated on campaigns, new products, and more
  • Support for all your questions
undefined. /
Free Tier
  • Start free from ECS to Big Data
  • Get Started in 3 Simple Steps
  • Try ECS t5 1C1G
undefined. /

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.