Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1029685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:35:01+00:00 2026-05-16T12:35:01+00:00

I am trying to deploy my rails application for the first time. Server is

  • 0

I am trying to deploy my rails application for the first time.

Server is running Ubuntu 10.4 server (64bit)
Local machine is running Windows XP.
Repository is at github

I have successfully run

cap deploy:setup

but when I run

cap deploy:cold

I get the following error:

D:\Rails\rails_apps\fx>cap deploy:cold
You are running Ruby 1.8.6, which has a bug in its threading implementation.
You are liable to encounter deadlocks running Capistrano, unless you install
the fastthread library, which is available as a gem:  
   gem install fastthread  
  * executing `deploy:cold'  
  * executing `deploy:update'  
 ** transaction: start  
  * executing `deploy:update_code'  
    updating the cached checkout on all servers  
*** [deploy:update_code] rolling back  
  * executing "rm -rf /var/www/fx/releases/20100818215651; true"  
    servers: ["pragmaticriskmanagement.gotdns.com"]  
    [pragmaticriskmanagement.gotdns.com] executing command  
    command finished  
D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy.rb:37:in ``': No such file or directory - git rev-parse master (Errno::ENOENT)
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy.rb:37:in `load'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy.rb:87:in `with_env'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy.rb:37:in `load'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistran/recipes/deploy/scm/git.rb:154:in `query_revision'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `send'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy/scm/base.rb:63:in `local'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in `method_missing'  
         ... 39 levels...  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/lib/capistrano/cli/execute.rb:14:in `execute'  
        from D:/Rails/ruby/lib/ruby/gems/1.8/gems/capistrano-2.1.0/bin/cap:4 
        from D:/Rails/ruby/bin/cap:19:in `load'  
        from D:/Rails/ruby/bin/cap:19  

Here is my ‘deploy.rb’ file

set :application, "fx"  #"pragmaticriskmanagement.gotdns.com"
set :repository,  "git@github.com:jmedding/Fx.git"
set :deploy_to, "/var/www/#{application}"

set :git_enable_submodules, 1         # Make sure git submodules are populated

set :location, "pragmaticriskmanagement.gotdns.com"

set :user, "xxxxx"
set :use_sudo, false

set :scm, :git

role :app, location #"your app-server here"
role :web, location #"your web-server here"
role :db,  location,    :primary => true #"your db-server here", :primary => true

namespace :deploy do
    desc "Restart Application"
    task :restart, :roles => :app do
      run "touch #{current_path}/tmp/restart.txt"
    end

    desc "Make symlink for database.yml" 
    task :symlink_dbyaml do
      run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml" 
    end

    desc "Create empty database.yml in shared path" 
    task :create_dbyaml do
      run "mkdir -p #{shared_path}/config" 
      put '', "#{shared_path}/config/database.yml" 
    end
end

  after 'deploy:setup', 'deploy:create_dbyaml'
  after 'deploy:update_code', 'deploy:symlink_dbyaml'

  after "deploy", "deploy:cleanup"

and now I’m stuck…

Any help would be greatly appreciated.

Thanks,
Jon

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:35:02+00:00Added an answer on May 16, 2026 at 12:35 pm

    Ok, I have made some progress.

    It seems that the error indicates that the git ls-remote command could not be found on the local system (win xp). As a test, I opened the GIT Bash shell and tried the command – it worked. Next, I tried

    cap deploy 
    

    from the GIT Bash shell. Command not found. OK, I added my rails path

    D:\Rails\ruby\bin

    to the windows ‘path’ variable. Now, try

    cap deploy
    

    from the bash shell. This seems to have solved this problem, which now leads to my next problem

    ** [xxxxxxxx.com :: out] Cloning into /var/www/fx/shared/cached-copy...
    ** [xxxxxxxx.com :: err] Permission denied (publickey).
    ** [xxxxxxxx.com :: err] fatal: The remote end hung up unexpectedly
    

    I can successfully run cap deploy from my linux box with the same public key. Also, I can push to my Github repo from this laptop with this key. Of course, the key in question should be on the server, but if it works when I run ‘cap’ from the linux box, why wouldn’t it run from here?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.