I am trying to create a Rails app that can be copied to another hard drive without having to reinstall its gems.
One thing I've tried is bundle install
the gems into vendor/bundle
, then copy the entire app over to the new location.
At the new location:
bundle config set path 'vendor/bundle'
bundle check
# which returns...
The following gems are missing
* nokogiri (1.10.8)
* nio4r (2.5.2)
* websocket-driver (0.7.1)
* bcrypt (3.1.7)
* ffi (1.12.2)
* sassc (2.2.1)
* pg (1.2.2)
* puma (4.3.1)
Install missing gems with `bundle install`
However, when I go to vendor/bundle/ruby/2.7.0/gems
, I see every one of those gems listed.
Try to follow the instruction using the gems in the folder above:
bundle install --local
=> Could not find nokogiri-1.10.8 in any of the sources
Bundle configuration:
~/myapp/.bundle/config:
---
BUNDLE_PATH: "vendor/bundle"
What's going on here?
Either delete or check your bundle config file for conflicting settings and paths that refer to the old location
Check for differences between your local and global bundle config files and resolve any conflicts
Try reinstalling your gems using the --local
argument