I had this problem and the solution I found was somewhat unsatisfactory and temporary, but it worked.
This error occurs during the rubber:install_gems
task. After it fails, log into the ec2 server via ssh. At this point if you try to run gem install rubber -v=2.1.2
manually in the remote console, it fails with the exact same error you show above. (the version number might be different for you, it depends on the rubber version you had when you did this).
So now create an empty folder with any name, and create an almost-empty Gemfile inside it.
$ mkdir dummy && cd dummy
$ nano Gemfile
Then fill the Gemfile with the following contents:
source 'http://rubygems.org'
gem 'rubber', '2.1.2'
Again, the version of rubber might be different for you.
After creating this file, run bundle install
and everything will install correctly. But don't ask me why it works differently when installing rubber via bundler than installing it via a plain old gem install
.
So after achieving this, logout from ec2 and re-run cap rubber:bootstrap
and it should work.
The unsatisfactory part is that if you decide to create new instances on ec2, it will fail again at the same point, and you'll have to repeat this steps and re-ignite the process manually for it to complete. So if any one can come up with a better solution like modifying rubber or something, let us know.