Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does bundler work (in general)?

I'm pretty new to Ruby/Rails but I was taking a look at bundler and was wondering how it works exactly. Do you install a full set of gems like normal gem install XYZand then use the Gemfile to pull a certain subset of those gems for use with a specific application? Or do you not install gems normally anymore and just include them in the Gemfile and then do a bundle install to include them all in a bundle that is then used with your application?

Thank you so much for taking the time to answer this, I'm just a little confused on what bundler's functionality is exactly.

-- MAP

like image 403
MAP Avatar asked Jun 17 '10 01:06

MAP


People also ask

What is the use of bundler?

Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production. Starting work on a project is as simple as bundle install .

What is the difference between bundle and bundler?

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.

What happens when you run bundle install?

When you make a change to the Gemfile(5) and then run bundle install , Bundler will update only the gems that you modified. In other words, if a gem that you did not modify worked before you called bundle install , it will continue to use the exact same versions of all dependencies as it used before the update.

Is bundler a package manager?

Bundler is a package manager for RubyGems.


1 Answers

These two links explain everything about bundler.

  • How does bundler bundle

  • How does bundle require gems

like image 105
Apoorv Parijat Avatar answered Sep 26 '22 21:09

Apoorv Parijat