捆绑vs捆绑器/捆绑vs捆绑安装 [英] bundle vs bundler / bundle vs bundle install
问题描述
-
捆绑包
&bundler
命令?
bundle $ c有什么区别? $ c>&
捆绑安装
?
如果没有区别,为什么会有多个命令执行相同的操作?
If there're no differences, why have multiple commands that do the same thing?
推荐答案
-
可执行文件
bundle
&捆绑器
具有相同的功能,因此可以互换使用。您可以在bundler / exe
中看到目录,其中bundler
可执行文件仅加载bundle
可执行文件。在我看来,bundle
命令比bundler
命令更常用。
The executables
bundle
&bundler
have the same functionality and therefore can be used interchangeably. You can see in thebundler/exe
directory that thebundler
executable just loads thebundle
executable. It seems to me that thebundle
command is more commonly used than thebundler
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屋!