Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Capistrano not installing gems with bundler?

Every time I deploy an app with Capistrano, it complains about missing gems. For example:

 ** [out :: mysite.com] Could not find WhateverGem-1.0.0 in any of the sources
 ** [out :: mysite.com] Run `bundle install` to install missing gems.

I resolve this by manually uploading my Gemfile, SSHing into the server, and running bundle install. However, this should not be happening.

Here's a copy of my deploy.rb and Capfile.

Could anybody point me in the right direction?

like image 713
Yuval Karmi Avatar asked Jun 03 '12 02:06

Yuval Karmi


People also ask

How do I fix a run bundle to install missing gems?

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 .

Where does bundler install gems?

A Gemfile describes the gem dependencies required to execute associated Ruby code. Place the Gemfile in the root of the directory containing the associated code. For instance, in a Rails application, place the Gemfile in the same directory as the Rakefile .

Is bundler a Ruby gem?

Bundler: The best way to manage a Ruby application's gems. Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.


1 Answers

You probably just need to add this to your config/deploy.rb

require "bundler/capistrano"
like image 174
Jesse Wolgamott Avatar answered Sep 19 '22 22:09

Jesse Wolgamott