Rails engine - vendor/bundle and vendor/cache

I created two rails engines. In one of them ‘bundle install’ generated
only a vendor/cache directory. In the other one, ‘bundle install’
both vendor/cache and vendor/bundle. The vendor/bundle directory is
causing me some problems. I do not remember what I did differently when
creating the two engines.

What causes ‘bundle install’ to create the vendor/bundle directory and
do I avoid this?

Thanks in advance.

Found the solution. This explanation may not be 100% accurate.

Bundle remembers how it was first executed in the directory ‘.bundle’.
Subsequent executions use this information. ‘bundle install’ puts the
in the vendor/bundle directory. ‘bundle package’ puts the gems in the
vendor/cache directory.

Apparently in the first engine I ran ‘bundle package’ first and in the
second I ran ‘bundle install’ first. To fix the problem, I deleted the
vendor/bundle, vendor/cache, and .bundle directories and then ran
package’, recreating the vendor/cache directory but not the

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs