Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Backup complains about missing dependency even though it is installed #420

fullofcaffeine opened this Issue · 13 comments

7 participants



I'm using RVM to create an env just for the Backup gem. After upgrading the gem, I started getting the following error when trying to perform my backup:

> backup perform --trigger my_backup   
[2013/03/13 01:17:00][error] CLIError: Dependency::LoadError: Dependency Missing
[2013/03/13 01:17:00][error]   Gem Name: net-ssh
[2013/03/13 01:17:00][error]   Used for: SSH Protocol (SSH Storage)
[2013/03/13 01:17:00][error]   
[2013/03/13 01:17:00][error]   To install the gem, issue the following command:
[2013/03/13 01:17:00][error]   > backup dependencies --install net-ssh
[2013/03/13 01:17:00][error]   Please try again after installing the missing dependency.

I then installed net-ssh:

gem install net-ssh

Successfully installed net-ssh-2.6.6
1 gem installed

I tried again, and got the same error.

If I try the suggested solution of running dependecies --install net-ssh, I get this:

 backup dependencies --install net-ssh
=== Bundler Detected ===
This command should not be run within a Bundler managed environment.
While it is possible to install Backup and it's dependencies using
Bundler, the gem version requirements must still be met as shown by:
> backup dependencies --list

But I'm not using bundler. Here's the folder structure:

├── config
│   ├── cron_log.log
│   └── schedule.rb
├── config.rb
├── data
│   └── my_backup
│       └── S3.yml
├── log
│   └── backup.log
└── other
    ├── README
    └── home_exclude.txt

Any ideas?




@fullofcaffeine Thanks for reporting this. You can now update to v3.1.3 and use the backup dependencies --install command to solve this.


I have a similar situation, but in a Bundler managed environment.
The latest capistrano version depends on net-ssh 2.6.6, whereas this gem explicitly stays below 2.5.x as its dependency. Whats the reason for that?


A couple of the other gems (net-scp, excon, fog) are also locking at lower gem versions.


+1 same error (backup version 3.2.0)... can't solve it.


This issue is getting more and more annoying. Having to use older versions of several gems because of this hard dependency.


@tanelsuurhans You are forcing Backup and your application to use the same versions of dependencies by having Backup in your application's Gemfile. Take it out and you'll have no problems. Backup is an application, not a library. Your app does not depend on it.

This specific issue with backup dependencies --install was fixed was fixed in 3.1.3.

@ghost ghost closed this

@burns I am still confused about how to use backup with a Rails application that uses Bundler. I followed your advice and didn't add Backup to the Gemfile but only installed it on the host machine.

Now, if I try to execute Backup, I get the following error:

[2013/06/07 13:32:53][error] CLIError
[2013/06/07 13:32:53][error] --- Wrapped Exception ---
[2013/06/07 13:32:53][error] Gem::LoadError: You have already activated multi_json 1.7.3, but your Gemfile requires multi_json 1.7.6. Using bundle exec may solve this.

How do I solve this (if not manually adjusting all gems that Backup uses in my Gemfile to require the older versions)?


Are you trying to activate your Rails app's bundle from within Backup's config.rb or a model file?
That's the only way I can duplicate that error.


Damn, you're right, I was loading the Rails environment in the backup config file. Sorry...


I've been using 3.0.27 without any problems. Installed 3.4.0 today on a new project and had net-ssh dependency error. Reverted back to 3.0.27 and everything was fine.

Note: I put backup in my Gemfile because it's convenient and easier to deploy.


+1 to axsuul and others. Backup is an app dependency (just like e.g. Unicorn) and it's often convenient to put them and related config in the app itself.


Your app does not require Backup's code to be loaded in order to function, therefore it is not a dependency.
Understand that Backup could be distributed as a rpm/deb package (like Vagrant), but we choose to distribute it using RubyGems because it's simpler.


@burns It makes it easier to deploy

@nruth nruth referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.