Quick question. Often I add a gem to my Gemfile and then run bundle
install and I notice that it installs a bunch of other stuff (in
addition to what I wanted):
Yes, one of the features is that it finds and installs dependencies for you, so you only have to list what you know that you're using directly, and not worry about all the requirements to get to where you can use them.
So this means I don't need to add devise to my Gemfile now and run a
bundle because devise is already isntalled and fully functioning in my
app?
No. This means that if you have devise in your gem file, and run bundle,
all gems that devise depends on will also be installed whether they are
specifically listed in the gem file or not.
For example, devise depends on warden. So if you install devise, either
manually using the "gem install" command, or indirectly by including
devise in your gem file and running "bundle [install]" then warden
(along with devises' other dependencies) will be installed.
However, if you were to include warden in your gem file, and NOT devise,
then only warden would be installed (along with all of warden's
dependencies) and devise would NOT. Warden does not depend on devise.