bundle vs bundler / bundle vs bundle install

时间:2017-04-08 19:19:15

标签: bundler

  1. bundle& bundler命令?

  2. bundle&之间有什么区别? bundle install

  3. 如果没有差异,为什么有多个命令可以做同样的事情?

1 个答案:

答案 0 :(得分:30)

  1. 可执行文件bundle & bundler have the same functionality因此可以互换使用。您可以在bundler/exe目录中看到bundler可执行文件只加载bundle可执行文件。在我看来,bundle命令比bundler命令更常用。

  2. 命令bundle& bundle install也具有相同的功能。 bundle使用Thorbundle's default task is install。此外,bundle ibundle install的功能相同,因为bundle's task i is mapped (aliased) to install

  3. 这是一个很棒的问题。 :-) Ruby倾向于遵循Perl programming motto: "There's more than one way to do it."我更倾向于Zen of Python原则:"应该有一个 - 最好只有一种 - 显而易见的方法。"我认为后一种原则适合于principle of least astonishment并倾向于帮助keep things simple。但总的来说,我仍然倾向于使用Ruby编程(特别是在构建基于HTTP的RESTful API时,我使用Rack)。我认为Ruby简单,优雅,可读。如果Ruby在这个问题上采取了Python的立场,那么Ruby可能会更好。