This is just how gem dependencies work. When you add a dependency it doesn’t automatically require the depended on gem (in fact it can’t because there is no way of knowing the filename to require — not all gems have the same name as their main file).
Adding a dependency to a gem has two effects. First, when you install the gem the depended on gems are also installed automatically.
Second, when the gem is activated (which normally happens when you require
a file from it, but can be done explicitly with gem
) the gem’s lib dir is added to the load path, and so are the lib dirs of any dependencies. This ensures that when the main gem calls require
on these dependencies the correct version will be used.
The main gem still needs to call require
on its dependencies. There is no way in general for Rubygems to know which file from the gem should be required, or when (or even if) it should happen. For example a dependency may only be needed in certain cases, so you want to avoid calling require (which would slow you down) unless you actually needed the functionality provided.