Followed the step in the
http://blog.bhushangahire.net/2010/02/17/setup-capistrano-to-deploy-rails-application-on-amazon-ec2-with-git/

------------------------------------------------------------
Able to connect to the ec2 as a User with SSH. (geoman.pub key is in
~/.ssh folder )
------------------------------------------------------------
1. Create a user geoman in ec2.
2. created public and private key for the user.
3. Copied the public key to ec2 and able to SSH as user to ec2 from
mac shell. ssh -i ~/.ssh/geoman -l geoman ec2-xx-xxx-xx-xxx.us-
west-2.compute.amazonaws.com

----------------------------------------------------------------------
Able to create a test rails project, place in local git and setup
Capistrano
-----------------------------------------------------------------------
Here is the deploy.rb


set :application, "awstestapp"
set :repository,  "."

set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`,
`perforce`, `subversion` or `none`

set :location, "ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com"
role :web, location                          # Your HTTP server,
Apache/etc
role :app, location                          # This may be the same as
your `Web` server
role :db,  location, :primary => true # This is where Rails migrations
will run
#role :db,  "your slave db-server here"

# The directory on the EC2 node that will be deployed to
set :deploy_to, "/var/www/vhosts/#{application}"

# The way in which files will be transferred from repository to remote
host
# If you were using a hosted github repository this would be slightly
different
set :deploy_via, :copy

# Set up SSH so it can connect to the EC2 node - assumes your SSH key
is in ~/.ssh/id_rsa
set :user, [File.join(ENV["HOME"], ".ssh", "geoman")]

# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

# If you are using Passenger mod_rails uncomment this:
# namespace :deploy do
#   task :start do ; end
#   task :stop do ; end
#   task :restart, :roles => :app, :except => { :no_release => true }
do
#     run "#{try_sudo} touch
#{File.join(current_path,'tmp','restart.txt')}"
#   end
# end

--------------------------------------------------------------------------------------
Run the command - cap deploy:setup FAILED
---
NOTE: [(geoman.pub key is in ~/.ssh folder )]
--------------------------------------------------------------------------------------
* executing `deploy:setup'
  * executing "sudo -p 'sudo password: ' mkdir -p /var/www/vhosts/
awstestapp /var/www/vhosts/awstestapp/releases /var/www/vhosts/
awstestapp/shared /var/www/vhosts/awstestapp/shared/system /var/www/
vhosts/awstestapp/shared/log /var/www/vhosts/awstestapp/shared/pids"
    servers: ["ec2-xx-xxx-xx-xxx.us-west-2.compute.amazonaws.com"]
Password:
connection failed for: ec2-xx-xxx-xx-xxx.us-
west-2.compute.amazonaws.com (Net::SSH::AuthenticationFailed: /Users/
geoman/.ssh/geoman)


what do I miss here? any help is appreciated.


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to