My directory structure is as follows:
application/
tmp/
rails_code/Capfile
rails_code/config/deploy.rb
rails_code/Gemfile
rails_code/Gemfile.lock
non_rails_code/
I am using capistrano to deploy the application code, but when i run cap deploy, then it fails to install gems using bundler, because it expects the Gemfile.lock to be in the application directory, whereas it is actually in the application/rails_code directory.
How can i specify the correct location of the Gemfile?
The Gemfile is where you specify which gems you want to use, and lets you specify which versions. The Gemfile. lock file is where Bundler records the exact versions that were installed. This way, when the same library/project is loaded on another machine, running bundle install will look at the Gemfile.
Gemfile. lock is automatically generated when you run bundle install or bundle update . It should never be edited manually.
This is configurable, do:
set :bundle_gemfile, "rails_code/Gemfile"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With