【问题标题】:error while deploying rails app to ec2 using rubber gem `response_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest)使用橡胶宝石`response_call'将rails应用程序部署到ec2时出错:预期(200)<=>实际(400错误请求)(Excon :: Errors :: BadRequest)
【发布时间】:2013-06-04 07:43:51
【问题描述】:

当我执行 cap Rubber:create_staging 时,当 Rubber 尝试创建 ec2 实例时出现以下错误。我是否缺少任何配置设置?

**创建实例AMI-eafa5883 / t1.micro / elearn_production_default,elearn_production_web,elearn_production_web_tools,elearn_production_production,elearn_production_apache,elearn_production_app,elearn_production_passenger,elearn_production_collectd,elearn_production_common,elearn_production_monit,elearn_production_db,elearn_production_mysql,elearn_production_mysql_master,elearn_production_elasticsearch,elearn_production_examples,elearn_production_graphite_server,elearn_production_graphite_web,elearn_production_graylog_elasticsearch ,elearn_production_graylog_mongodb,elearn_production_mongodb,elearn_production_graylog_server,elearn_production_graylog_web,elearn_production_haproxy/us-east-1b

/Users/svisamsetty/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon/middlewares/expects.rb:10:in response_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest) from /Users/svisamsetty/.rvm/gems/ruby-1.9.3-p429/gems/excon-0.22.1/lib/excon/connection.rb:355:inresponse'

【问题讨论】:

    标签: ruby-on-rails-3 amazon-ec2 rubber


    【解决方案1】:

    我也有同样的问题。看起来它在 Rubber github 页面上作为问题 #362 进行了介绍: https://github.com/rubber/rubber/issues/362

    【讨论】:

    • 请总结链接的相关部分,链接随时可能消失。
    【解决方案2】:

    我将我的 excon 版本从 0.22.01 降级到 0.21.0

    在 gem 文件中添加这个然后捆绑,解决了这个问题。 gem 'excon', '~> 0.21.0'

    但我不知道根本原因。

    【讨论】:

    • 降级没有帮助,还有其他想法吗?
    【解决方案3】:

    我通过运行更新雾宝石解决了这个问题:

    bundle update fog
    

    显然我是非常过时的运行雾 1.9.0。现在我正在运行 1.23.0 并按照 Rubber 的 Railscasts (http://railscasts.com/episodes/347-rubber-and-amazon-ec2) 成功部署到 EC2

    这还将以下 gem 更新到这些版本:

    • 雾芯 1.23.0
    • net-scp 1.2.1
    • 雾-json 1.0.0
    • 列表项
    • 变形 0.0.2
    • 雾灯箱 0.1.1
    • 雾软层 0.3.11
    • ipaddress 0.8.0
    • mini_portile 0.6.0

    Nokogiri 依赖于 libxml2-2.9.0 库,因此请务必安装该库

    希望对你有帮助!!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-04-18
      • 2013-01-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多