I'm trying to get the backup RubyGem (https://github.com/meskyanichi/backup) working. When I try and trigger a backup I get:
bill:~/Backup$ backup perform --trigger bidkat_backup
[2012/08/13 16:58:37][error] Dependency::LoadError: Dependency missing
[2012/08/13 16:58:37][error] Dependency required for:
[2012/08/13 16:58:37][error] Amazon S3, Rackspace Cloud Files (S3, CloudFiles Storages)
[2012/08/13 16:58:37][error] To install the gem, issue the following command:
[2012/08/13 16:58:37][error] > gem install fog -v '~> 1.4.0'
[2012/08/13 16:58:37][error] Please try again after installing the missing dependency.
But checking for the dependency I get this:
bill:~/Backup$ gem query
*** LOCAL GEMS ***
builder (3.0.0)
excon (0.14.3)
fog (1.4.0)
formatador (0.2.3)
mime-types (1.19)
multi_json (1.3.6)
net-scp (1.0.4)
net-ssh (2.5.2)
nokogiri (1.5.5)
ruby-hmac (0.4.0)
bill:~/Backup$ which fog
/usr/local/bin/fog
And checking my ruby version gives me:
bill:~/Backup$ which ruby
/usr/bin/ruby
bill:~/Backup$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
Looking at the source to backup, they are attempting to load the gem like this:
def self.all
{
'fog' => {
:require => 'fog',
:version => '~> 1.4.0',
:for => 'Amazon S3, Rackspace Cloud Files (S3, CloudFiles Storages)'
},
....
}
def self.load(name)
begin
gem(name, all[name][:version])
require(all[name][:require])
rescue LoadError
Logger.error Errors::Dependency::LoadError.new(<<-EOS)
Dependency missing
Dependency required for:
#{all[name][:for]}
To install the gem, issue the following command:
> gem install #{name} -v '#{all[name][:version]}'
Please try again after installing the missing dependency.
EOS
exit 1
end
end
I don't use ruby and so I have no idea what is going on. Does somebody know what the problem is and how I could fix it? Or is there a better way to get a mongodb backup pushed to S3?
Thanks!
Do you have a Gemfile in that Backup directory? I know that has caused problems for me in the past. Also try running the backup from outside the Backup directory and referencing the location of the config file. It seems like something is altering your environment. Are you using rvm or rbenv or something similiar? But ya, try running this:
cd # to get back to user dir
gem install backup
gem install fog -v=1.4.0
backup perform --trigger bidkat_backup --config-file path_to_config/config.rb
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