ruby宝石区块链最新消息_Ruby宝石| Ruby工具
ruby寶石區塊鏈最新消息
Ruby寶石 (Ruby Gems)
Every language has its package manager which helps it by providing libraries and a standard format to distribute Ruby program. It is a type of tool which is developed to easily facilitate the installation of Gems. The command-line tool is the interface used by Ruby gems which provide service in installing and managing libraries.
每種語言都有其包管理器,可通過提供庫和標準格式來分發Ruby程序來幫助它。 它是一種開發用于輕松安裝Gems的工具。 命令行工具是Ruby gem使用的界面,可在安裝和管理庫時提供服務。
寶石的結構 (Structure of Gems)
Every gem is identical by a version, platform and obviously, a name. The architecture of CPU, Type of Operating System and version are few of the factors which decide the working criteria of Gem.
每個寶石在版本,平臺和名稱上都是相同的。 CPU的體系結構,操作系統的類型和版本是決定Gem工作標準的因素很少。
Each gem comprises of:
每個寶石包括:
Documentation
文獻資料
Code
碼
Gemspec i.e. Gem specification
Gemspec,即Gem規范
The organisation of code follows the structure which is mentioned below:
代碼的組織遵循以下結構:
Now let us understand each term in a single line.
現在讓我們在一行中了解每個術語。
The bin directory contains the binary file.
bin目錄包含二進制文件。
The code for the gem is being stored by lib directory.
gem的代碼由lib目錄存儲。
The testing is conducted by the test directory.
測試由測試目錄執行。
Generation of code and automation of test id done by Rake which used Rakefile.
使用Rakefile的Rake完成代碼的生成和測試ID的自動化。
README simply comprises documentation for most of the gems.
自述文件僅包含大多數寶石的文檔。
Information like the purpose of the gem, the time gem was created, author gem belongs to, is contained by Gem specification also known as gemspec.
諸如寶石的目的,寶石的創建時間,作者的寶石所屬之類的信息包含在寶石規范(也稱為gemspec)中。
使用寶石 (Using Gems)
Gem contains files to install along with package information. The practice of building gems directly is known as Rake. The gems are generally built from ".gemspec" files. Let us understand the following gem commands for various purposes listed below:
寶石包含要安裝的文件以及軟件包信息。 直接建造寶石的做法被稱為耙 。 寶石通常是從“ .gemspec”文件構建的。 讓我們了解以下出于各種目的列出的gem命令:
For installation, type the following in the terminal,
要進行安裝,請在終端中鍵入以下內容:
gem install mygemFor uninstallation, use the following command,
要卸載,請使用以下命令,
gem uninstall mygemFor listing installed gems, type the following,
要列出已安裝的寶石,請鍵入以下內容,
gem listFor listing available gem, write the following,
要列出可用的寶石,請輸入以下內容:
gem list -rIn order to create RDoc documentation for all gems, type the following,
為了為所有gem創建RDoc文檔,請鍵入以下內容,
gem rdoc -allFor adding a trusted certificate, type the following command,
要添加受信任的證書,請鍵入以下命令,
gem cert -aIf you want to download but you do not want to install the downloaded gem at that instant, for meeting that purpose type the following,
如果您要下載但不想在那一刻安裝已下載的gem,為達到該目的,請鍵入以下內容,
gem fetch mygemIf you want to search the gems which are available for use, type the following command,
如果要搜索可用的寶石,請鍵入以下命令,
gem search (STRING) --remoteWe have got a gem command which is available to provide help in building and maintaining ".gemspec" or ".gem" files. This process is known by the name of package building. If you want to build a .gem file from .gemspec file, use the following command on the gem terminal,
我們有一個gem命令,該命令可用來幫助構建和維護“ .gemspec”或“ .gem”文件。 此過程稱為打包構建的名稱。 如果你想從.gemspec文件建立一個.gem文件,寶石終端上使用以下命令,
gem build (gem_name).gemspec翻譯自: https://www.includehelp.com/ruby/gems-ruby-tools.aspx
ruby寶石區塊鏈最新消息
總結
以上是生活随笔為你收集整理的ruby宝石区块链最新消息_Ruby宝石| Ruby工具的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: array.unshift_Ruby中带
- 下一篇: 文本分析工具 数据科学_数据科学工具