Then configure your rubbertest/config/rubber/rubber.yml file. Modify your app_name, app_user, domain, access_key, secret_access_key, account. I made some assumptions and set my configuration to the following:

app_name: rubbertest
app_user: ec2-user
domain: yourdomainname.com (I just assigned a temporary domain even though it may have not been necessary? Not sure)
access_key: (set it to yours)
secret_access_key: (set it to yours)
account: (set it to your account number)

I haven’t yet found a clear explanation on what to set some of the fields above. So unfortunately, I’m taking some guesses with some of them right now. I will update as soon as I figure this out. If you can explain each, please comment and help other RoRists accelerate their learning.

Here is the issue I’m running into when executing the cap rubber:create_staging which is supposed to deploy my rubbertest app onto EC2:

btw… once you type cap rubber:create_staging, just accept the defaults by pressing enter.

First of all, don’t be alarmed that I’m using ruby-1.9.2-preview instead of ruby-1.9.2-p0 or whatever it was. I was hoping that I would get rid of the issue above if I upgraded my ruby version but unfortunately I get the same error.

I went into the digest.rb file as mentioned in stack trace and printed the openssl version. It was an older version which I don’t believe supports sha256? It made me realize that it’s probably using a version of openssl that’s tied to the ruby rvm version and it’s not using the openssl from my system. I did a puts to stdout from within the digest.rb and it was older.

The only way I was able to get around this problem was to hack AWS.rb:96 (mentioned in stack trace above) and set it to use sha1 instead of sha256 (changed digest = OpenSSL::Digest::Digest.new(‘sha256’) to digest = OpenSSL::Digest::Digest.new(‘sha1’)
See Rubber on Github and Rubber’s Wiki

Once I did that, I got past that point and ran into issues with keys/authentication, which seems like I’m very close!

However, I get a new error below:

navid@~/Development/rubbertest: <strong>cap rubber:create_staging</strong>
triggering load callbacks
* executing `rubber:init'
* executing `rubber:create_staging'
Hostname to use for staging instance [production]:
Roles to use for staging instance [web,app,db:primary=true]:
* executing `rubber:create'
/Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/amazon-ec2-0.9.17/lib/AWS.rb:363:in `aws_error?': <strong>The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. (AWS::SignatureDoesNotMatch)</strong>
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/amazon-ec2-0.9.17/lib/AWS.rb:300:in `block in make_request'
from /Users/navid/.rvm/rubies/ruby-1.9.2-preview3/lib/ruby/1.9.1/net/http.rb:627:in `start'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/amazon-ec2-0.9.17/lib/AWS.rb:274:in `make_request'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/amazon-ec2-0.9.17/lib/AWS.rb:324:in `response_generator'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/amazon-ec2-0.9.17/lib/AWS/EC2/security_groups.rb:42:in `describe_security_groups'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/rubber-1.8.0/lib/rubber/cloud/aws.rb:93:in `describe_security_groups'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/rubber-1.8.0/lib/rubber/recipes/rubber/security_groups.rb:102:in `sync_security_groups'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/rubber-1.8.0/lib/rubber/recipes/rubber/security_groups.rb:51:in `setup_security_groups'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/rubber-1.8.0/lib/rubber/recipes/rubber/instances.rb:193:in `create_instance'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/rubber-1.8.0/lib/rubber/recipes/rubber/instances.rb:38:in `block (2 levels) in load'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:186:in `method_missing'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/namespaces.rb:104:in `block in task'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/rubber-1.8.0/lib/rubber/recipes/rubber/utils.rb:22:in `block (2 levels) in load'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `instance_eval'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:139:in `invoke_task_directly'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/callbacks.rb:27:in `invoke_task_directly_with_callbacks'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:89:in `execute_task'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/configuration/execution.rb:101:in `find_and_execute_task'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:46:in `block in execute_requested_actions'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:45:in `each'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:45:in `execute_requested_actions'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/cli/help.rb:19:in `execute_requested_actions_with_help'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:34:in `execute!'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/lib/capistrano/cli/execute.rb:14:in `execute'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/gems/capistrano-2.5.19/bin/cap:4:in `<top (required)>'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/bin/cap:19:in `load'
from /Users/navid/.rvm/gems/ruby-1.9.2-preview3/bin/cap:19:in `<main>'

Even after I tried to upgrade openssl on my mac, I still see "Unsupported digest algorithm"

However, I was finally able to get rid of this problem by doing the following. You may not need to upgrade to Snow Leopard from Leopard but I went ahead. I thought I would be able to get rid of this problem easily by upgrading to Snow Leopard, which I later proved to be false assumption. After I upgraded to Snow Leopard, I had a huge set of other problems I had to deal with which included having to reinstall Macports, install the latest version of Xcode and install libxml2 and sqlite via source and then rebuild rvm for 64 bit instead of i386 (32-bit).

Here is some of the things I tried:

Download the tarball of openssl from http://openssl.org/ instead of just doing a port install openssl.
Then do the following: