- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 padrino 为我的亚马逊环境构建一个仪表板。但是当我在 Controller 中尝试以下代码时:
get :index, :map => "/" do
AWS.config(access_key_id: 'ACCESS_KEY',
secret_access_key: 'secret_access_key',
region: 'ap-southeast-2')
ec2 = AWS::EC2.new
response = ec2.client.describe_instances(:instance_ids => ['instance_id'])
@instance = response[:reservation_set].first[:instances_set].first
render 'index'
end
我遇到了以下错误:
SocketError - getaddrinfo: nodename nor servname provided, or not known:
/Users/mymac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:877:in initialize'
/Users/mymac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:877:inopen'
/Users/mymac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:877:in block in connect'
/Users/mymac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/timeout.rb:66:intimeout'
/Users/mymac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:876:in connect'
/Users/mymac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:862:indo_start'
/Users/mymac/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:857:in start'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/http/connection_pool.rb:309:instart_session'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/http/connection_pool.rb:125:in session_for'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/http/net_http_handler.rb:55:inhandle'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:252:in block in make_sync_request'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:288:inretry_server_errors'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:248:in make_sync_request'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:510:inblock (2 levels) in client_request'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:390:in log_client_request'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:476:inblock in client_request'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:372:in return_or_raise'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/aws-sdk-1.37.0/lib/aws/core/client.rb:475:inclient_request'
(eval):3:in describe_instances'
/Users/mymac/dev/padrino_workspace/aem_dashboard/app/controllers/aem.rb:24:inblock (2 levels) in '
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:699:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:699:inblock in route'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:62:in []'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:62:inblock (3 levels) in process_destination_path'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:976:in route_eval'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:62:inblock (2 levels) in process_destination_path'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:62:in catch'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:62:inblock in process_destination_path'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:37:in instance_eval'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:37:inprocess_destination_path'
(eval):20:in block in call'
(eval):9:incatch'
(eval):9:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/http_router-0.11.1/lib/http_router.rb:288:inraw_call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/http_router-0.11.1/lib/http_router.rb:142:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:1101:inroute!'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:1086:in block in dispatch!'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:inblock in invoke'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in catch'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:ininvoke'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/application/routing.rb:1084:in dispatch!'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:inblock in call!'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in block in invoke'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:incatch'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1049:in invoke'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:889:incall!'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:877:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sass-3.3.3/lib/sass/plugin/rack.rb:54:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/base.rb:50:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/xss_header.rb:18:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/base.rb:50:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/base.rb:50:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/json_csrf.rb:18:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/base.rb:50:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/base.rb:50:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-protection-1.5.2/lib/rack/protection/frame_options.rb:31:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/head.rb:11:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/reloader/rack.rb:22:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/logger.rb:398:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/show_exceptions.rb:21:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:incontext'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:2004:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in block in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1778:insynchronize'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/sinatra-1.4.4/lib/sinatra/base.rb:1469:in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/router.rb:82:inblock in call'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/router.rb:75:in each'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/router.rb:75:incall'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thin-1.6.2/lib/thin/connection.rb:86:in block in pre_process'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thin-1.6.2/lib/thin/connection.rb:84:incatch'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thin-1.6.2/lib/thin/connection.rb:84:in pre_process'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thin-1.6.2/lib/thin/connection.rb:53:inprocess'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thin-1.6.2/lib/thin/connection.rb:39:in receive_data'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:inrun_machine'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/eventmachine-1.0.3/lib/eventmachine.rb:187:in run'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thin-1.6.2/lib/thin/backends/base.rb:73:instart'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thin-1.6.2/lib/thin/server.rb:162:in start'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/handler/thin.rb:16:inrun'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/rack-1.5.2/lib/rack/server.rb:264:in start'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/server.rb:50:instart'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/server.rb:39:in start'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/server.rb:12:inrun!'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/cli/adapter.rb:7:in start'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/lib/padrino-core/cli/base.rb:32:instart'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.17.0/lib/thor/task.rb:27:in run'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.17.0/lib/thor/invocation.rb:120:ininvoke_task'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.17.0/lib/thor.rb:344:in dispatch'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/thor-0.17.0/lib/thor/base.rb:434:instart'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/gems/padrino-core-0.12.0/bin/padrino:9:in <top (required)>'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/bin/padrino:23:inload'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/bin/padrino:23:in <main>'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:ineval'
/Users/mymac/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `'
这是我的 gem 文件:
ruby '2.0.0'
gem 'rake'
gem 'thin'
gem 'bcrypt-ruby', :require => 'bcrypt'
gem 'sass'
gem 'haml'
gem 'mongoid', '~>3.0.0'
gem 'mocha', :group => 'test', :require => false
gem 'shoulda', :group => 'test'
gem 'rack-test', :require => 'rack/test', :group => 'test'
gem 'padrino', '0.12.0'
gem "bootstrap-sass", "~> 3.1.1.0"
gem 'aws-sdk', '~> 1.37.0'
gem 'rest-client', '~> 1.6.7'
gem 'net-ping', '~> 1.7.2'
如果我在 irb、sinatra 和 rails 中尝试以下代码,它运行良好:
AWS.config(access_key_id: 'ACCESS_KEY',
secret_access_key: 'secret_access_key',
region: 'ap-southeast-2')
ec2 = AWS::EC2.new
response = ec2.client.describe_instances(:instance_ids => ['instance_id'])
@instance = response[:reservation_set].first[:instances_set].first
谁能帮帮我。谢谢。
我使用的是 ruby 2.0.0、padrino 0.12.0 和 OS X 10.8.2。问候强尼
最佳答案
您的区域配置可能有误。我遇到了同样的错误 when trying to access an S3 bucket .因为我的桶是美国标准的,又名“us-east-1”,这个配置最终起作用了:
AWS.config(access_key_id: 'xxx',
secret_access_key: 'xxx',
region: 'us-west-1',
s3: { region: 'us-east-1' })
关于amazon-web-services - SocketError at/getaddrinfo : nodename nor servname provided, 或未知 padrino,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22588089/
我正在开发Shopify主题,并且正在使用https://github.com/Shopify/shopify_theme将文件更新到Shopify。 不幸的是,我无法正常工作...当我尝试上传/更新
看了好几篇相关的帖子和解决方案,还是想不通,还是返回“Excon::Errors::SocketError 在/postsgetaddrinfo: nodename 或 servname 提供,或
我正在尝试遵循this neo4j教程,但是在连接到API时遇到问题。这是我的回溯: >>> graph.delete_all() Traceback (most recent call last):
我想在服务器和客户端之间建立连接,所以服务器向客户端发送一个字符串。 这是服务器: import socket def Main(): host = '190.176.141.23'#ip c
我正在尝试在远程 Ubuntu 服务器上设置 Flask/Neo4j 应用程序,但遇到了一个我无法解决的问题。我的应用程序使用 py2neo,但是当它尝试连接到图表时,应用程序崩溃并且 Neo4j 进
将 Ruby on Rails 与 Carrierwave + Fog 结合使用,它依赖于 Excon 连接到 S3。 Rails 服务器正在 AWS EC2 上运行。大多数时候,Carrierwav
尝试在 C9.io 中启动我的 Rails 应用程序时,我看到下面的套接字错误。我不确定如何纠正这个问题。有什么想法吗? ruby 2.3.0p0(2015-12-25 修订版 53290)[x86_
我得到了 GitLab 5.4 使用 Bitnami Stack 5.4.0-0 创建用户,登录并添加 key 后,推送到新存储库时 git@gitlab.funshion.com:gitdemo1
我在 Ruby 中使用 Mandrill-api 以编程方式发送交易电子邮件。 我的 Rails 应用程序中(或多或少)有以下行, mandrill ||= Mandrill::API.new con
在EFK设置中,由于日志中出现以下错误,因此fluentd突然停止发送到elasticsearch: 2020-09-28 18:48:55 +0000 [warn]: #0 Could not co
我制作了一个并行解析文本文件和下载数据的程序。在9个或更少的线程中运行下载方法时,程序没有错误。但是当在 10 个或更多线程中运行该方法时,程序会抛出“`initialize': getaddrinf
我使用 py2neo 2.0 执行长时间运行(5 分钟)的 Cypher 查询: graph.cypher.run(query)或 result = graph.cypher.execute(quer
我在 Ruby on Rails 中使用 Tire gem 来使用 Elasticsearch 进行搜索。在我的本地机器上它工作得很好。 在我的登台服务器上,我(随机?)收到此错误:SocketErr
我正在尝试在已连接的 SSL 套接字断开互联网连接时获得信号。这是我派生 QSslSocket 的方式: struct CloudSSL::Socket : public QSslSocket {
我可以将 SetBuffer 与 SocketAsyncEventArgs 一起使用。 如果我尝试使用 BufferList(在执行 SetBuffer(null, 0, 0) 之后),当我在套接字上
我希望能够说明当 Open-Uri open() 调用超时或引发诸如 SocketError 之类的异常时,我正在按预期处理事情,但是我在这方面遇到了麻烦。 这是我的规范(针对 SocketError
我目前收到以下错误:Excon::Errors::SocketError - Broken pipe (Errno::EPIPE)上传大于 150kb 的图像时。 150kb 以下的图像正常工作。研究
我正在使用NetBeans IDE 8,ruby-2.2.0-p0,mysql2,iMac,OS X 10.9.5 我试图在生产模式下运行我的应用程序,我得到: => Booting WEBri
我正在尝试在Rails应用程序中运行docker容器,但是我一直收到以下错误:- container = Docker::Container.create({'Image' => 'mitc/judg
成功引导后 bundle exec knife zero bootstrap root@139.59.210.225 我正在尝试将我的 Recipe 应用到远程使用 bundle exec knife
我是一名优秀的程序员,十分优秀!