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:

代码的组织遵循以下结构:

Ruby Gems | Ruby Tools

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 mygem

For uninstallation, use the following command,

要卸载,请使用以下命令,

 gem uninstall mygem

For listing installed gems, type the following,

要列出已安装的宝石,请键入以下内容,

 gem list

For listing available gem, write the following,

要列出可用的宝石,请输入以下内容:

 gem list -r

In order to create RDoc documentation for all gems, type the following,

为了为所有gem创建RDoc文档,请键入以下内容,

 gem rdoc -all

For adding a trusted certificate, type the following command,

要添加受信任的证书,请键入以下命令,

 gem cert -a

If 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 mygem

If you want to search the gems which are available for use, type the following command,

如果要搜索可用的宝石,请键入以下命令,

 gem search (STRING)  --remote

We 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宝石区块链最新消息

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值