home PYTHONJAVA
 

Ruby RubyGems

RubyGems is a bundle administrator for Ruby that gives a standard organization to conveying Ruby projects and libraries, just as an instrument for overseeing bundle establishment.

RubyGems is intended to effectively deal with the instruments introduced by the diamond and the servers used to convey the pearl. This is like well-suited get under Ubuntu, yum for Centos, and pip for Python.

RubyGems was made in November 2003 and turned out to be a piece of the Ruby standard library from Ruby 1.9.

If your Ruby is lower than variant 1.9, you can likewise introduce it manually:

Update the RubyGems command:

$ jewel update - -  System # requires manager or root user

Gem

Gem is a bundle director for Ruby modules (called Gems). It contains bundle data and documents for establishment.

Gem is normally worked from a ".gemspec" record and contains YAML documents about Gem data. Ruby code can likewise assemble Gem legitimately, in which case Rake is typically utilized.

gem command

The

gem order is utilized to assemble, transfer, download, and introduce Gem bundles.

gem usage

RubyGems is fundamentally the same as in capacity to well-suited get, portage, yum, and npm.

Installation:

gem introduce mygem

Uninstall:

gem uninstall mygem

List introduced gems:

gem list - - local 

List accessible pearls, for example:

gem list - - remote 

Create RDoc documentation for all gems:

gem rdoc - - all 

Download a pearl yet don't introduce it:

gem bring mygem

Search from accessible pearls, for example:

gem seek STRING - -  Remote

Building of jewel package

The

gem direction is additionally used to fabricate and keep up .gemspec and .jewel documents.

Fabricate .pearl with a .gemspec file:

gem fabricate mygem.gemspec 

Modify residential source

Due to residential system reasons (you know), the irregular association of asset documents on rubygems.org put away on Amazon S3 fizzled.

So you won't react when you experience diamond introduce rack or pack introduce for quite a while. You can utilize diamond introduce rails - V to see the execution procedure.

So we can alter it to Taobao download source: http://ruby.taobao.org/

First, check the current source:

$ pearl sources -l 

*** CURRENT SOURCES *** 

Https://rubygems.org/

Next, expel https://rubygems.org/and include the Taobao download source http://ruby.taobao.org/.

$ pearl sources - -  Remove https://rubygems.org/ 

$ pearl sources -a https://ruby.taobao.org/ 

$ pearl sources -l 

*** CURRENT SOURCES *** 

Https://ruby.taobao.org 

# Make beyond any doubt that just ruby.taobao.org 

$ diamond introduce rails

If you use Gemfile and Bundle (for instance: Rails project)

You can utilize the pack's jewel source code to reflect directions.

$ group config mirror. Https://rubygems.org https://ruby.taobao.org

This way you don't need to change the wellspring of your Gemfile.

source 'https://rubygems.org/' 

Pearl 'rails', '4.1.0' 

...





welookups is optimized for learning.© welookups. 2018 - 2019 All Right Reserved and you agree to have read and accepted our term and condition.