捆绑vs捆绑器/捆绑vs捆绑安装 [英] bundle vs bundler / bundle vs bundle install

查看:81
本文介绍了捆绑vs捆绑器/捆绑vs捆绑安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 捆绑包& bundler 命令?

bundle & 捆绑安装

如果没有区别,为什么会有多个命令执行相同的操作?

If there're no differences, why have multiple commands that do the same thing?


推荐答案


  1. 可执行文件 bundle & 捆绑器具有相同的功能,因此可以互换使用。您可以在 bundler / exe 中看到目录,其中 bundler 可执行文件仅加载 bundle 可执行文件。在我看来, bundle 命令比 bundler 命令更常用。

  1. The executables bundle & bundler have the same functionality and therefore can be used interchangeably. You can see in the bundler/exe directory that the bundler executable just loads the bundle executable. It seems to me that the bundle command is more commonly used than the bundler command.

命令 bundle & 捆绑安装也具有相同的功能。 捆绑包使用 Thor bundle 的默认任务是 install 。另外, bundle i bundle install 的作用相同,因为 bundle 的任务 i 被映射(别名)到 install

The commands bundle & bundle install also have the same functionality. bundle uses Thor, and bundle's default task is install. Also, bundle i does the same thing as bundle install because bundle's task i is mapped (aliased) to install.

这是一个很大的问题。 :-) Ruby倾向于遵循 Perl编程的座右铭:有多种方法可以做到这一点。 我倾向于使用 Zen of Python 原理:那里应该是一种明显的方式,最好只有一种。我认为后一种原则符合最小惊讶原则,并且倾向于帮助使事情变得简单。但是总的来说,我仍然倾向于使用Ruby编程(特别是在构建基于HTTP的RESTful API时,为此我使用 Rack )。我认为Ruby简单,优雅且可读。如果在这个问题上采取Python的立场,也许Ruby会更好。

That's a GREAT question. :-) Ruby tends to follow the Perl programming motto: "There's more than one way to do it." I tend to prefer the Zen of Python principle: "There should be one—and preferably only one—obvious way to do it." I think the latter principle caters to the principle of least astonishment and tends to help keep things simple. Overall however, I still tend to prefer to program in Ruby (especially when building HTTP-based RESTful APIs, for which I use Rack). I think Ruby is simple, elegant, and readable. Perhaps Ruby would be even better if it took on Python's stance regarding this issue.

这篇关于捆绑vs捆绑器/捆绑vs捆绑安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆