【发布时间】:2013-03-21 01:09:43
【问题描述】:
我一直在关注这个 railscast 教程,我很确定我正确地遵循了所有步骤,但是当我去运行 cap Rubber:create_staging 时,我得到了以下错误。
不知道从哪里开始调试。
The key pair 'gsg-keypair' does not exist (Fog::Compute::AWS::NotFound)
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/connection.rb:332:in `response'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/excon-0.20.1/lib/excon/connection.rb:226:in `request'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/fog-1.10.0/lib/fog/core/connection.rb:21:in `request'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/fog-1.10.0/lib/fog/aws/compute.rb:384:in `_request'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/fog-1.10.0/lib/fog/aws/compute.rb:379:in `request'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/fog-1.10.0/lib/fog/aws/requests/compute/run_instances.rb:119:in `run_instances'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/fog-1.10.0/lib/fog/aws/models/compute/server.rb:173:in `save'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/fog-1.10.0/lib/fog/core/collection.rb:52:in `create'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/rubber-2.2.4/lib/rubber/cloud/fog.rb:27:in `create_instance'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/rubber-2.2.4/lib/rubber/thread_safe_proxy.rb:13:in `method_missing'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/rubber-2.2.4/lib/rubber/recipes/rubber/instances.rb:310:in `create_instance'
from /Users/anderskitson/.rbenv/versions/1.9.3-p374/lib/ruby/gems/1.9.1/gems/rubber-2.2.4/lib/rubber/recipes/rubber/instances.rb:230:in `block (2 levels) in create_instances'
【问题讨论】:
-
你能通过
ssh -i path/to/privatekey root@ec2-xx...comssh 进入你的实例吗? -
hmm 不知道在哪里可以找到被 xx.com 替换的地址
-
这将是您的 ec2 实例的地址
-
这可能是我的问题我不认为我已经创建了一个 ec2 实例
-
如果您正在关注本教程railscasts.com/episodes/…,asciicast 会介绍如何获取 gsg 密钥并将它们放置在正确的目录中
标签: ruby-on-rails amazon-ec2 capistrano rubber