We''re moving some "internal use" apps to a spare internal machine - instead of a public, shared host. I''m not sure if it''s relevant, but the new machine is running OS 10.3. I''m having a strange problem using Capistrano. It happens on both our development machines, and only when deploying to this server. I run ''cap deploy'' and get: in `process!'': command "if [[ ! -d /Users/www/myappnamehere/releases/20060516200956 ]]; then svn co --username josh -q -r741 http://mysvn/myappnamehere/trunk/Users/www/myappnamehere/releases/20060516200956 && (test -e /Users/www/myappnamehere/revisions.log || touch /Users/www/myappnamehere/revisions.log && chmod 666 /Users/www/myappnamehere/revisions.log) && echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 741 20060516200956 >> /Users/www/myappnamehere/revisions.log; fi" failed If I paste this command into terminal on the new server, I get: date: illegal format Eye-balling it, it looks like this might be backslashes on the ""s, so I strip those, and try again... and it works. So, I can manually check-out my project, using the same commands as Capistrano would use, but I can''t use Capistrano. I suppose it shows how dependent on Capistrano I''ve become, that this annoys me so. I''ve been staring at this all day, so I''m probably going cross-eyed, but I can''t see what would be causing this to happen? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060516/7ec114a3/attachment.html
Looks like Mac OS X''s date command isn''t compatible with that syntax:> ~: date +\"%Y-%m-%d %H:%M:%S\" > date: illegal time format > usage: date [-nu] [-r seconds] [+format] > date [[[[[cc]yy]mm]dd]hh]mm[.ss]I''d grab the gnu source, build and install it into /usr/local/bin, and make sure your deployment user environment had /usr/local/bin first in PATH. -- -- Tom Mornini On May 16, 2006, at 1:22 PM, Josh on Rails wrote:> We''re moving some "internal use" apps to a spare internal machine - > instead of a public, shared host. I''m not sure if it''s relevant, > but the new machine is running OS 10.3. > > I''m having a strange problem using Capistrano. It happens on both > our development machines, and only when deploying to this server. > > I run ''cap deploy'' and get: > > in `process!'': command "if [[ ! -d /Users/www/myappnamehere/ > releases/20060516200956 ]]; then > svn co --username josh -q -r741 http://mysvn/myappnamehere/ > trunk /Users/www/myappnamehere/releases/20060516200956 && (test -e / > Users/www/myappnamehere/revisions.log || touch /Users/www/ > myappnamehere/revisions.log && chmod 666 /Users/www/myappnamehere/ > revisions.log) && echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 741 > 20060516200956 >> /Users/www/myappnamehere/revisions.log; > fi" failed > > If I paste this command into terminal on the new server, I get: > > date: illegal format > > Eye-balling it, it looks like this might be backslashes on the ""s, > so I strip those, and try again... and it works. So, I can manually > check-out my project, using the same commands as Capistrano would > use, but I can''t use Capistrano. > > I suppose it shows how dependent on Capistrano I''ve become, that > this annoys me so. > > I''ve been staring at this all day, so I''m probably going cross- > eyed, but I can''t see what would be causing this to happen? > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Wow... Okay, easier said than done, but I''ll keep digging... Are the slash-quotes part of the command, or are they being escaped in the error output? Because when I take the slashes out, it works. Which makes me suspicious, is all I''m saying. Is anybody else using Cap to deploy to OS X having this problem? On 5/16/06, Tom Mornini <tmornini@infomania.com> wrote:> > Looks like Mac OS X''s date command isn''t compatible with that syntax: > > > ~: date +\"%Y-%m-%d %H:%M:%S\" > > date: illegal time format > > usage: date [-nu] [-r seconds] [+format] > > date [[[[[cc]yy]mm]dd]hh]mm[.ss] > > I''d grab the gnu source, build and install it into /usr/local/bin, > and make sure your deployment user environment had /usr/local/bin > first in PATH. > > -- > -- Tom Mornini > > On May 16, 2006, at 1:22 PM, Josh on Rails wrote: > > > We''re moving some "internal use" apps to a spare internal machine - > > instead of a public, shared host. I''m not sure if it''s relevant, > > but the new machine is running OS 10.3. > > > > I''m having a strange problem using Capistrano. It happens on both > > our development machines, and only when deploying to this server. > > > > I run ''cap deploy'' and get: > > > > in `process!'': command "if [[ ! -d /Users/www/myappnamehere/ > > releases/20060516200956 ]]; then > > svn co --username josh -q -r741 http://mysvn/myappnamehere/ > > trunk /Users/www/myappnamehere/releases/20060516200956 && (test -e / > > Users/www/myappnamehere/revisions.log || touch /Users/www/ > > myappnamehere/revisions.log && chmod 666 /Users/www/myappnamehere/ > > revisions.log) && echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 741 > > 20060516200956 >> /Users/www/myappnamehere/revisions.log; > > fi" failed > > > > If I paste this command into terminal on the new server, I get: > > > > date: illegal format > > > > Eye-balling it, it looks like this might be backslashes on the ""s, > > so I strip those, and try again... and it works. So, I can manually > > check-out my project, using the same commands as Capistrano would > > use, but I can''t use Capistrano. > > > > I suppose it shows how dependent on Capistrano I''ve become, that > > this annoys me so. > > > > I''ve been staring at this all day, so I''m probably going cross- > > eyed, but I can''t see what would be causing this to happen? >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060517/e9cbd16d/attachment.html
So, continuing with this... The command in question comes from: /usr/local/lib/ruby/gems/1.8/gems/capistrano-1.1.0 /lib/capistrano/scm/base.rb def logging_commands(directory = nil) log = "#{configuration.deploy_to}/revisions.log" "(test -e #{log} || touch #{log} && chmod 666 #{log}) && " + "echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER #{configuration.revision} #{directory} >> #{log};" end So, stuck on this idea that the \" are the problem, I took them out: def logging_commands(directory = nil) log = "#{configuration.deploy_to}/revisions.log" "(test -e #{log} || touch #{log} && chmod 666 #{log}) && " + ''echo `date +"%Y-%m-%d %H:%M:%S"`'' + " $USER #{configuration.revision} #{directory} >> #{log};" end Yet, when I run "cap deploy" in Terminal, I get: in `process!'': command "if [[ ! -d /Users/www/myappnamehere/releases/20060517142841 ]]; then\\\n svn co --username josh -q -r741 http://mysvnserver/myappnamehere/Users/www/myappnamehere/releases/20060517142841 &&\\\n (test -e /Users/www/myappnamehere/revisions.log || touch /Users/www/myappnamehere/revisions.log && chmod 666 /Users/www/myappnamehere/revisions.log) && echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 741 20060517142841 >> /Users/www/myappnamehere/revisions.log;\\\n fi" failed on myserver (RuntimeError) That is, the \" are back! So, the logging_commands seem to get escaped somewhere - it''s not clear to me whether they get escaped in the error logger, or in the command processor... Oh: And I can run echo `date +"%Y-%m-%d %H:%M:%S"` test1 test2 test3 >> test.log; on the server without problems. What am I missing? On May 16, 2006, at 1:22 PM, Josh on Rails wrote:> We''re moving some "internal use" apps to a spare internal machine - > instead of a public, shared host. I''m not sure if it''s relevant, > but the new machine is running OS 10.3. > > I''m having a strange problem using Capistrano. It happens on both > our development machines, and only when deploying to this server. > > I run ''cap deploy'' and get: > > in `process!'': command "if [[ ! -d /Users/www/myappnamehere/ > releases/20060516200956 ]]; then > svn co --username josh -q -r741 http://mysvn/myappnamehere/ > trunk /Users/www/myappnamehere/releases/20060516200956 && (test -e / > Users/www/myappnamehere/revisions.log || touch /Users/www/ > myappnamehere/revisions.log && chmod 666 /Users/www/myappnamehere/ > revisions.log) && echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 741 > 20060516200956 >> /Users/www/myappnamehere/revisions.log; > fi" failed > > If I paste this command into terminal on the new server, I get: > > date: illegal format > > Eye-balling it, it looks like this might be backslashes on the ""s, > so I strip those, and try again... and it works. So, I can manually > check-out my project, using the same commands as Capistrano would > use, but I can''t use Capistrano. > > I suppose it shows how dependent on Capistrano I''ve become, that > this annoys me so. > > I''ve been staring at this all day, so I''m probably going cross- > eyed, but I can''t see what would be causing this to happen?-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060517/b89b89ba/attachment.html
> "(test -e #{log} || touch #{log} && chmod 666 #{log}) && " + > ''echo `date +"%Y-%m-%d %H:%M:%S"`'' + " $USER #{configuration.revision} >#{directory} >> #{log};" >end >What happens if you remove the slashes the alternate way? i.e.: "echo `date +''%Y-%m-%d %H:%M:%S''`" -r -- Posted with http://DevLists.com. Sign up and save your mailbox.
Apparently Analagous Threads
- Capistrano, chmod, and revisions.log
- Capistrano with CVS repository doesn''t seem to work
- capistrano deploy failing on /public/system "No such file or directory"
- Capistrano deploy failing with :if Expression Syntax failure
- Capistrano: update instead of checkout?