error while deploying rails app to ec2 using rubber gem `response_call': Expected(200) <=> Actual(400 Bad Request) (Excon::Errors::BadRequest)

StackOverflow https://stackoverflow.com/questions/16912354

Question

when I do cap rubber:create_staging, I am getting the following error when rubber tries to create ec2 instance. Am I missing any configuration setting?

** Creating instance 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'

Was it helpful?

Solution

I'm having the same problem. It looks like it is covered as Issue #362 on the Rubber github page: https://github.com/rubber/rubber/issues/362

OTHER TIPS

I downgraded my excon version from 0.22.01 to 0.21.0

Adding this in the gem file and then bundle, fixed the problem. gem 'excon', '~> 0.21.0'

I am not aware of the root cause though.

I solved this by updating the fog gem by running:

bundle update fog

Aparently I was very outdated running fog 1.9.0. Now im running 1.23.0 and got to successfully deploy to EC2 by following Rubber's Railscasts (http://railscasts.com/episodes/347-rubber-and-amazon-ec2)

This also updated the following gems to these versions:

  • fog-core 1.23.0
  • net-scp 1.2.1
  • fog-json 1.0.0
  • List item
  • inflecto 0.0.2
  • fog-brightbox 0.1.1
  • fog-softlayer 0.3.11
  • ipaddress 0.8.0
  • mini_portile 0.6.0

Nokogiri depends on libxml2-2.9.0 library so be sure to have that installed

Hope it helps!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top