A D Vishnu Prasad

Director of Cloud Engineering @ Team8Solutions, Freelancer

Rubber + EC2 + Rails + Oracle + Nginx + Passenger

Deploying rails app into EC2 using Rubber

Step 1

Get the key from aws and store it in ~/.ec2 folder

1
chmod 400 keyname

Generate the publickey

1
ssh-keygen -y -f keyname > keyname.pub

Step 2

Add rubber gem in your gemfile

1
2
gem rubber
bundle install

Step 3

Now do vulcanize. Am using nginx and passenger

1
rails g vulcanize minimal_passenger_nginx

Step 4

Now edit following fields in config/rubber/rubber.yml

access key
secret access key
account name
app name
app user
image id
image type

Step 5 :

Deploy Part :

1
2
3
cap rubber:create
cap rubber:bootstrap
cap deploy

If you are using oracle instant client set the environment variable in server and then do cap deploy

Troubleshooting:

Here is the way to bypass fingerprint authentication prompt

add these two lines in deploy script.

1
2
ssh_options[:keys] = [File.join(ENV["HOME"], ".ssh", "id_rsa")]
set :deploy_to, "your_deploy_folder"