Search code examples
ruby-on-railscapistrano

capistrano 2 : `tar' could not be found in the path on the local host


I am using Capistrano version 2 and trying to deploy code on server.

but when i enter cap deploy:check command i am getting below error.

   * executing "which tar"
    servers: ["53.79.454.474"]
    [53.79.454.474] executing command
    command finished in 1088ms
The following dependencies failed. Please check them and try again:
--> `tar' could not be found in the path on the local host

I also try to install tar on my remote ubuntu machine, but still getting the same error.

sudo apt-get install tar

Reading package lists... Done
Building dependency tree
Reading state information... Done
tar is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I don't know why i am getting this error. please help

Thanks,


Solution

  • This error appears because the machine that holds your repo does not have tar installed (windows). You should have no problems when moving your :repo_url to your production server or any other server with a linux distribution.

    ** Edit

    Before moving the repo, you could try to set the :copy_compression as :zip in your production.rb

    if that fails (it might), and you absolutely want/need to stick to microsoft, there will be no way around installing cygwin with tar enabled on the machine your repo lies on and adding cygwin to your PATH variable.

    Check this google discussion for more information.