Hi again,
If I choose the :copy strategy, I suppose I have to inform
the :repository.
I have to specify the full path to my git repository ?
As I'm executing capistrano from the same App Rails directory, wich is
the same as the git for that project, how I can inform it ?
/Documents/Ruby/scanner
I'm getting some errors and I think this is the problem ...
thanks again,
r.
MontxMacBookPro:scanner montx$ cap deploy:update
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
* preparing local cache at /tmp/caches/scanner
executing locally: "git ls-remote [email protected]/scanner HEAD"
fatal: '[email protected]/scanner': unable to chdir or not a git archive
fatal: The remote end hung up unexpectedly
*** [deploy:update_code] rolling back
* executing "rm -rf /u/apps/scanner/releases/20090122185644; true"
servers: ["192.168.2.200"]
Password:
[192.168.2.200] executing command
command finished
/Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/recipes/
deploy/scm/git.rb:224:in `query_revision': Unable to resolve revision
for 'HEAD' on repository '[email protected]/scanner'. (RuntimeError)
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
recipes/deploy/scm/base.rb:35:in `send'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
recipes/deploy/scm/base.rb:35:in `method_missing'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
recipes/deploy/scm/base.rb:63:in `local'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
recipes/deploy/scm/base.rb:35:in `method_missing'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
recipes/deploy.rb:37:in `load'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
configuration/variables.rb:87:in `call'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
configuration/variables.rb:87:in `fetch'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/
configuration/variables.rb:110:in `protect'
... 29 levels...
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/lib/capistrano/cli/
execute.rb:14:in `execute'
from /Library/Ruby/Gems/1.8/gems/capistrano-2.5.3/bin/cap:4
from /usr/bin/cap:19:in `load'
from /usr/bin/cap:19
MontxMac
On 22/01/2009, at 19:43, Raimon Fernandez Sirera wrote:
>
> you're right!
>
> I read the wiki page and copy the code from there:
>
> The copy strategy comes with its own set of variables:
> set :copy_strategy, :export set :copy_cache, true set :copy_cache, "/
> tmp/caches/myapp" set :copy_exclude, [".git/*", ".svn/*"]
> set :copy_compression, :gzip # Also valid are :zip and :bz2
> ...
>
> Maybe is a typo on the wiki-page ...
>
> Now Capistrano tells me ...
> "You appear to have all necessary dependencies installed"
> thanks for your help!
>
> regards,
>
> r.
>
>
> On 22/01/2009, at 19:37, Jamis Buck wrote:
>
>> Looks like you changed the strategy to :export, which still does git
>> clones on the remote server directly. As I said in my last email, if
>> your remote server cannot access the git repo, you need to use
>> the :copy
>> strategy. The others will not work.
>>
>> - Jamis
>>
>> On 1/22/09 11:23 AM, Raimon Fernandez Sirera wrote:
>>> ok, thanks!
>>>
>>> After changing the file deploy.rb I'm getting exactly the same
>>> error:
>>>
>>> The following dependencies failed. Please check them and try again:
>>> --> `git' could not be found in the path (192.168.2.200)
>>>
>>> Why is still trying to access git on my remote machine ?
>>>
>>> Here is the net config file:
>>>
>>>
>>> set :application, "scanner"
>>> #set :repository, "[email protected]/scanner.git"
>>>
>>> # If you aren't deploying to /u/apps/#{application} on the target
>>> # servers (which is the default), you can specify the actual
>>> location
>>> # via the :deploy_to variable:
>>> # set :deploy_to, "/var/www/#{application}"
>>>
>>> # If you aren't using Subversion to manage your source code, specify
>>> # your SCM below:
>>> set :scm, :git
>>> set :scm_username, 'montx'
>>> set :scm_password, proc{Capistrano::CLI.password_prompt('GIT
>>> pass:')}
>>>
>>>
>>> role :app, "192.168.2.200"
>>> role :web, "192.168.2.200"
>>> role :db, "192.168.2.200", :primary => true
>>>
>>> #set :deploy_via, :remote_cache
>>>
>>> set :copy_strategy, :export
>>>
>>> set :copy_cache, true
>>> set :copy_cache, "/tmp/caches/scanner"
>>>
>>> set :copy_exclude, [".git/*", ".svn/*"]
>>> set :copy_compression, :gzip # Also valid are :zip and :bz2
>>>
>>>
>>> set :user, "rai"
>>>
>>>
>>> thanks,
>>>
>>> r.
>>>
>>>
>>> On 22/01/2009, at 19:12, Jamis Buck wrote:
>>>
>>>>
>>>> You have configured capistrano to use the :remote_cache deployment
>>>> strategy, which requires the repository to be accessible on the
>>>> remote
>>>> host, and for git to be installed there. (See
>>>> http://wiki.capify.org/article/
>>>> Understanding_Deployment_Strategies).
>>>>
>>>> What you probably ACTUALLY want is the :copy strategy, which does
>>>> not
>>>> require any git access on the remote hosts. (See the same link,
>>>> above,
>>>> for info about :copy.)
>>>>
>>>> - Jamis
>>>>
>>>> On 1/22/09 10:56 AM, montx wrote:
>>>>> Hello,
>>>>>
>>>>>
>>>>> I'm totally new to Capistrano and git.
>>>>>
>>>>> I'm trying to push one of my Rails into a production server, at
>>>>> this
>>>>> moment it's a computer at my side, for testing purposes.
>>>>>
>>>>> I have installed git in my developer machine, I don't use any
>>>>> other
>>>>> repository or share it with no-one.
>>>>>
>>>>> While executing the cap deploy:check I get an error:
>>>>>
>>>>>
>>>>> ontxMacBookPro:scanner montx$ cap deploy:check
>>>>> * executing `deploy:check'
>>>>> * executing "test -d /u/apps/scanner/releases"
>>>>> servers: ["192.168.2.200"]
>>>>> Password:
>>>>> [192.168.2.200] executing command
>>>>> command finished
>>>>> * executing "test -w /u/apps/scanner"
>>>>> servers: ["192.168.2.200"]
>>>>> [192.168.2.200] executing command
>>>>> command finished
>>>>> * executing "test -w /u/apps/scanner/releases"
>>>>> servers: ["192.168.2.200"]
>>>>> [192.168.2.200] executing command
>>>>> command finished
>>>>> * executing "which git"
>>>>> servers: ["192.168.2.200"]
>>>>> [192.168.2.200] executing command
>>>>> command finished
>>>>> * executing "test -w /u/apps/scanner/shared"
>>>>> servers: ["192.168.2.200"]
>>>>> [192.168.2.200] executing command
>>>>> command finished
>>>>> The following dependencies failed. Please check them and try
>>>>> again:
>>>>> --> `git' could not be found in the path (192.168.2.200)
>>>>> MontxMacBookPro:scanner montx$
>>>>>
>>>>> So, the problem is with the repository of git.
>>>>>
>>>>> The deploy.rb has few data:
>>>>>
>>>>>
>>>>> set :application, "scanner"
>>>>> set :repository, "[email protected]/scanner.git"
>>>>>
>>>>> set :scm, :git
>>>>> set :scm_username, 'xxxxx'
>>>>> set :scm_password, proc{Capistrano::CLI.password_prompt('GIT
>>>>> pass:')}
>>>>>
>>>>> role :app, "192.168.2.200"
>>>>> role :web, "192.168.2.200"
>>>>> role :db, "192.168.2.200", :primary => true
>>>>>
>>>>> set :deploy_via, :remote_cache
>>>>>
>>>>> set :user, "xxxxxxx"
>>>>>
>>>>>
>>>>> I though it wasn't necessary to install git on the production
>>>>> machine,
>>>>> just in case I've installed it, but I'm getting the same error.
>>>>>
>>>>> My git repository is in my local machine:
>>>>>
>>>>> MontxMacBookPro:~ montx$ cd Documents/Ruby/scanner/
>>>>>
>>>>> How I have to specify my repository in the deploy.rb ?
>>>>>
>>>>> thanks,
>>>>>
>>>>> regards,
>>>>>
>>>>> r.
>>>>>
>>>>>
>>>>>>
>>>>
>>>>
>>>>>>>
>>>>
>>>
>>>
>>
>>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---