Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

  1. What is the difference between the bundle & bundler commands?

  2. What is the difference between bundle & bundle install?

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

question from:https://stackoverflow.com/questions/43299366/bundle-vs-bundler-bundle-vs-bundle-install

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
402 views
Welcome To Ask or Share your Answers For Others

1 Answer

  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.

  2. 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.

  3. 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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...