This is driving me crazy. I added a gem (hirb) to the Gemfile and now I can't deploy.
Yes, I used bundle install --path vendor/cache
Yes I used bundle package
Yes I committed Gemfile and Gemfile.lock
I deleted the vendor/cache folder in the production machine so it would generate it again instead of updating it. Was this wrong?
Whenever I run cap:deploy
I get the following...
executing "cd /var/www/releases/20120606002321 && bundle install --gemfile /var/www/releases/20120606002321/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test"
servers: ["11.111.11.11"]
[11.111.11.11] executing command
[11.111.11.11] env PATH=/var/lib/gems/1.9.1/bin:$PATH sh -c 'cd /var/www/releases/20120606002321 && bundle install --gemfile /var/www/releases/20120606002321/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test'
** [out :: 11.111.11.11] Some gems seem to be missing from your vendor/cache directory.
** [out :: 11.111.11.11] Could not find multi_json-1.3.6 in any of the sources
command finished in 48571ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/releases/20120606002321; true"
servers: ["11.111.11.11"]
[11.111.11.11] executing command
[11.111.11.11] env PATH=/var/lib/gems/1.9.1/bin:$PATH sh -c 'rm -rf /var/www/releases/20120606002321; true'
command finished in 6417ms
failed: "env PATH=/var/lib/gems/1.9.1/bin:$PATH sh -c 'cd /var/www/releases/20120606002321 && bundle install --gemfile /var/www/releases/20120606002321/Gemfile --path /var/www/shared/bundle --deployment --quiet --without development test'" on 11.111.11.11
In the invoked popup, start typing bundler, select bundle install and press Enter . Select Tools | Bundler | Install from the main menu. Open the Gemfile, place the caret at any highlighted gem missing in the project SDK and press Alt+Enter . Select Install missing gems using 'bundler' and press Enter .
The Gemfile is wherever you want it to be - usually in the main directory of your project and the name of the file is Gemfile . It's convenient to have one because it allows you to use Bundler to manage which gems and which versions of each your project needs to run.
Use `gem install -v` You may already be familiar with gem install , but if you add the -v flag, you can specify the version of the gem to install. Using -v you can specify an exact version or use version comparators.
run the command bundle install in your shell, once you have your Gemfile created. This command will look your Gemfile and install the relevant Gems on the indicated versions. The Gemfiles are installed because in your Gemfile you are pointing out the source where the gems can be downloaded from.
You might want to try removing the --deployment
flag. That seems to allow Bundler to install from both the vendor/cache
source and Rubygems.
Capfile:
set :bundle_flags, "--quiet --no-cache"
A related bug: https://github.com/bundler/bundler/issues/1454
Try,
bundle install --no-deployment
This removes the --deployment
"bundle freeze" that prevents updates you're attempting. You can verify a freeze is imposed by looking for BUNDLE_FROZEN
in .bundle/config
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