Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
fullofcaffeine opened this Issue · 13 comments

7 participants

@fullofcaffeine

Hi,

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:

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

Any ideas?

Thanks,

Marcelo.

@ghost

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

@tanelsuurhans

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?

@jshou

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

@nicolasgarnil

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

@tanelsuurhans

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

@ghost

@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
@manuelmeurer

@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)?

@ghost

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.

@manuelmeurer

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

@axsuul

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.

@mbixby

+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.

@ghost

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.

@axsuul

@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.