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 XYZ
and 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
Think of bundler as a package management tool.
From
bundle help
command:bundle install
# Install the current environment to the systembundle package
# Locks and then caches all of the gems into vendor/cacheSo
bundle install
command will install all gems to the system that are listed in Gemfile as well as their dependencies. If the gem was not previously installed it will grab it from the gemcutter repo.bundle package
will cache the .gem files into your apps vendor/cache directory.No need to run
gem install
first.These two links explain everything about bundler.
How does bundler bundle
How does bundle require gems