我正在尝试使用rubber
gem将我的rails应用程序上传到free-tier ec2实例。使用railcast视频并遵循本教程
https://liggat.org/a-full-AWS-rails-stack-provision-and-deployment-with-the-rubber-gem/
使用cap rubber:create
,我可以创建ec2实例,但它没有连接。我收到以下错误:
** Failed to connect to xx.xxx.xxx.xx, retrying
* 2017-10-31 19:10:56 executing `rubber:_ensure_key_file_present'
servers: ["xx.xxx.xxx.xx"]
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh.rb:197: warning: constant ::Fixnum is deprecated
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:67:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:84:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
./Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/cipher_factory.rb:98: warning: constant OpenSSL::Cipher::Cipher is deprecated
. ** Failed to connect to xx.xxx.xxx.xx, retrying
* 2017-10-31 19:10:59 executing `rubber:_ensure_key_file_present'
rubber
也不会更新 / etc / hosts 文件。但有趣的是,当我通过
ssh -v -i ~/.ec2/gsg-keypair ubuntu@ec2-xx.xxx.xxx.xx.us-west-2.compute.amazonaws.com
它连接起来了。此外,cap rubber:bootstrap
在此之后失败,出现此错误
* 2017-10-31 19:13:17 executing `rubber:bootstrap'
triggering before callbacks for `rubber:bootstrap'
* 2017-10-31 19:13:17 executing `rubber:base:update_sudoers'
servers: ["production.xxxxx.io"]
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh.rb:197: warning: constant ::Fixnum is deprecated
/Users/somnathdas/.rvm/gems/ruby-2.4.0/gems/net-ssh-2.9.4/lib/net/ssh/transport/session.rb:67:in `initialize': Object#timeout is deprecated, use Timeout.timeout instead.
connection failed for: production.xxxx.io (SocketError: getaddrinfo: nodename nor servname provided, or not known)
我被困在这5天了。如果某种灵魂可以提供帮助,我真的有义务。