Re: [capistrano] Git Errors on deployment

29 views
Skip to first unread message

Rafa García

unread,
Sep 18, 2012, 1:18:10 AM9/18/12
to capis...@googlegroups.com
Hi Jeremy,

  Could you execute this command, by hand?

git ls-remote g...@github.com:XXXXXXXXXX/XXXXXXXXXXX.git unicorn_test

  Check the url, just to be sure it's a repo and not a workout copy.

Regards

2012/9/18 Jeremy Rottman <rott...@gmail.com>
I am in the process of doing some final dry runs of my deployments to ec2 and I have run into an issue. Normally my deployments go very smoothly and this is the first time I have ever had this issue. 

When I attempt to deploy from git I get the error detailed in this gist: https://gist.github.com/3740162

Here are the details of my environment I am deploying from:

Ruby: ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
Capistrano: Capistrano v2.12.0
Deploy/Cap File: https://gist.github.com/3740212

--
* You received this message because you are subscribed to the Google Groups "Capistrano" group.
* To post to this group, send email to capis...@googlegroups.com
* To unsubscribe from this group, send email to capistrano+...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en

Jeremy Rottman

unread,
Sep 18, 2012, 11:56:04 AM9/18/12
to capis...@googlegroups.com
Rafa, 

I am able to run this command on the server. I did eventually figure this issue out. For some reason it was due to the fact that I was overriding the deploy:migrations and deploy:migrate tasks. 

Rafa García

unread,
Sep 23, 2012, 4:58:15 PM9/23/12
to capis...@googlegroups.com
I was revising your deploy.rb and I don't know why it happened.

My guess (if the problem were in migrations tasks) is something wrong with your release_path variable , but it don't really  make sense to me. I say it because original migrations tasks do some checks to choose a directory or another for deploying:

  # Description task omitted
  task :migrate, :roles => :db, :only => { :primary => true } do
    rake = fetch(:rake, "rake")
    rails_env = fetch(:rails_env, "production")
    migrate_env = fetch(:migrate_env, "")
    migrate_target = fetch(:migrate_target, :latest)

    directory = case migrate_target.to_sym
      when :current then current_path
      when :latest  then latest_release
      else raise ArgumentError, "unknown migration target #{migrate_target.inspect}"
      end

    run "cd #{directory} && #{rake} RAILS_ENV=#{rails_env} #{migrate_env} db:migrate"
  end
Reply all
Reply to author
Forward
0 new messages