【发布时间】:2012-08-10 04:45:48
【问题描述】:
我正在尝试让备份 RubyGem (https://github.com/meskyanichi/backup) 正常工作。当我尝试触发备份时,我得到:
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.
但是检查依赖我得到这个:
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
检查我的 ruby 版本给了我:
bill:~/Backup$ which ruby
/usr/bin/ruby
bill:~/Backup$ ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
查看要备份的源,他们正尝试像这样加载 gem:
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
我不使用 ruby,所以我不知道发生了什么。有人知道问题是什么以及我该如何解决?或者有没有更好的方法将 mongodb 备份推送到 S3?
谢谢!
【问题讨论】:
标签: ruby amazon-s3 gem backup fog