Capistrano deploying everything except .htaccess

425 views
Skip to first unread message

JonC

unread,
Jun 3, 2010, 1:27:00 AM6/3/10
to Capistrano
I have Capistrano configured and it works perfectly...except that it
doesn't seem to be copying my .htaccess files. I've checked and they
are in the repo with my other files. The only explanation I can think
of is that since I'm executing Capistrano from a Windows machine,
maybe the .* files get ignored? Has anybody else experienced this?

Lee Hambley

unread,
Jun 3, 2010, 6:17:01 AM6/3/10
to capis...@googlegroups.com
Please include all the information as requested on the Google groups homepage… specifically in this instance:
  • Which deploy strategy are you using (:copy, for example relies on Tar, which behaves unexpectedly with hidden files)
  • What version of Cap, Ruby, Net::SSH and etc are you using ……
Thanks, Lee


--
* 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

Jon Chin

unread,
Jun 3, 2010, 9:37:12 PM6/3/10
to capis...@googlegroups.com
Oops, sorry about that.  Here's my environment:
Ruby 1.8.6
Capistrano 2.5.18
Deploying with remote_cache from a git repository

Thanks in advance for any suggestions/advice!

Lee Hambley

unread,
Jun 4, 2010, 6:02:53 AM6/4/10
to capis...@googlegroups.com
John,

Looks like in that case the rsync|copy from the cached_copy to the release directory is ignoring hidden files… Take a look at the definition here, and see if you spot anything obvious: http://github.com/capistrano/capistrano/blob/master/lib/capistrano/recipes/deploy/strategy/remote_cache.rb#L39

Also, for the record you should be off 1.8.6 (not causing this problem) but it is more then 2/3 years old, and completely obsolete now……

- Lee

Robin Bowes

unread,
Jun 4, 2010, 6:18:30 AM6/4/10
to capis...@googlegroups.com
On 04/06/10 11:02, Lee Hambley wrote:

> Also, for the record you should be off 1.8.6 (not causing this problem)

> but it is more then 2/3 years old, and completely obsolete now��

Lee,

That is an unrealistic suggestion.

The latest release of RHEL (+ derivatives) has ruby 1.8.6, so many
people will be stuck with that version.

R.

Lee Hambley

unread,
Jun 4, 2010, 6:39:34 AM6/4/10
to capis...@googlegroups.com
Out dated distributions aside… there is a catalog of serious problems in 1.8.6 from string handling, through thread scheduling, race conditions on trivial file system operations and more - it is effectively obsolete; and given it's age, and the catalog of problems I certainly won't go out of my way to support it here. In this instance the problem isn't related - but I've closed more than one ticket as there's been no evidence that they present on modern (even old) versions of Ruby. We're 3 months away from Matz starting work on Ruby 2.0 ( I spoke with him just last week ) – with him being most disappointed that people have failed completely to move towards 1.9… as it's something I believe very strongly in not using old software. (And, need I remind you of the last time Debian, for example http://www.ubuntu.com/usn/usn-612-1 - They revised their update policy in that are rather quickly following that discovery. 

Ruby 1.8.7 has been available for about 2 years and one week, take a look at the announcement here… http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/ - two years and nobody updated a package for some operating systems yet… that is simply unreasonable.

And Robin, I know we don't often agree - I'm not looking for a fight - and in fact I work in a rails shop where for a variety of reasons we still use 1.8.7 - with a great many back-ported and custom patches for one thing and another - with this in mind I feel that I am qualified to speak about managing software versions in an environment where such things are critical

And @Jon – what I'm saying is - if it's not a problem and you have no reason not to… upgrading to 1.8.7 ( at least ) will make your life easier… hey throw the boat out and switch to 1.9.x - we've supported and encouraged it for a long time :) Anyway, back to the issue - take a look at the specific man pages for those tools on your OS (gnu and system versions can differ) and make sure the flags are set to copy hidden files, in the event that you don't set copy_exclude... or that you do - you should check whether the defaults make problems for you –  the default is only to skip the .git directory - if present… take a look though Jon

- Lee

On 4 June 2010 12:18, Robin Bowes <robin...@robinbowes.com> wrote:
On 04/06/10 11:02, Lee Hambley wrote:

> Also, for the record you should be off 1.8.6 (not causing this problem)
> but it is more then 2/3 years old, and completely obsolete now……

Lee,

That is an unrealistic suggestion.

The latest release of RHEL (+ derivatives) has ruby 1.8.6, so many
people will be stuck with that version.

R.

--

Robin Bowes

unread,
Jun 4, 2010, 7:16:32 AM6/4/10
to capis...@googlegroups.com
On 04/06/10 11:39, Lee Hambley wrote:
> Out dated distributions aside� there is a catalog of serious problems in

> 1.8.6 from string handling, through thread scheduling, race conditions
> on trivial file system operations and more - it is effectively obsolete;
> and given it's age, and the catalog of problems I certainly won't go out
> of my way to support it here. In this instance the problem isn't related
> - but I've closed more than one ticket as there's been no evidence that
> they present on modern (even old) versions of Ruby. We're 3 months away
> from Matz starting work on Ruby 2.0 ( I spoke with him just last week )
> � with him being most disappointed that people have failed completely to
> move towards 1.9� as it's something I believe very strongly in not using

> old software. (And, need I remind you of the last time Debian, for
> example http://www.ubuntu.com/usn/usn-612-1 - They revised their update
> policy in that are rather quickly following that discovery.
>
> Ruby 1.8.7 has been available for about 2 years and one week, take a
> look at the announcement
> here� http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/
> - two years and nobody updated a package for some operating systems yet�

> that is simply unreasonable.
>
> And Robin, I know we don't often agree - I'm not looking for a fight -
> and in fact I work in a rails shop where for a variety of reasons we
> still use 1.8.7 - with a great many back-ported and custom patches for
> one thing and another - with this in mind I feel that I am qualified to
> speak about managing software versions in an environment where such
> things are critical

Lee,

I don't disagree with any of your reasons for preferring later versions
of software - "HAMBLEY & BOWES IN AGREEMENT SHOCKER!!".

However the fact remains that, for whatever reasons, commonly-used
popular enterprise linux distributions still have ruby 1.8.6, with no
easy route to deploy a later version. Hell, the recently-released Fedora
13 still only has 1.8.6, and I seem to recall that RHEL6 beta also does.
So, there is no easy way (that I know of) to get ruby 1.8.7 (or above)
on RH-flavour platforms.

Now, you may find that unreasonable but the fact remains that 1.8.6 is
what a lot of folk have to work with - a situation that is not likely to
change for quite some time.

R.

Lee Hambley

unread,
Jun 4, 2010, 7:53:30 AM6/4/10
to capis...@googlegroups.com
Robin,

Sure - lets not hijack Jon's thread - but pushing operating system vendors to upgrade through the requirement of softwares… Lets leave it at that (and, I have considered being the Ruby package maintainer and pushing such things on that front)

- Lee

On 4 June 2010 13:16, Robin Bowes <robin...@robinbowes.com> wrote:
On 04/06/10 11:39, Lee Hambley wrote:
> Out dated distributions aside… there is a catalog of serious problems in

> 1.8.6 from string handling, through thread scheduling, race conditions
> on trivial file system operations and more - it is effectively obsolete;
> and given it's age, and the catalog of problems I certainly won't go out
> of my way to support it here. In this instance the problem isn't related
> - but I've closed more than one ticket as there's been no evidence that
> they present on modern (even old) versions of Ruby. We're 3 months away
> from Matz starting work on Ruby 2.0 ( I spoke with him just last week )
> – with him being most disappointed that people have failed completely to
> move towards 1.9… as it's something I believe very strongly in not using

> old software. (And, need I remind you of the last time Debian, for
> example http://www.ubuntu.com/usn/usn-612-1 - They revised their update
> policy in that are rather quickly following that discovery.
>
> Ruby 1.8.7 has been available for about 2 years and one week, take a
> look at the announcement
> here… http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/
> - two years and nobody updated a package for some operating systems yet…

> that is simply unreasonable.
>
> And Robin, I know we don't often agree - I'm not looking for a fight -
> and in fact I work in a rails shop where for a variety of reasons we
> still use 1.8.7 - with a great many back-ported and custom patches for
> one thing and another - with this in mind I feel that I am qualified to
> speak about managing software versions in an environment where such
> things are critical

Lee,

I don't disagree with any of your reasons for preferring later versions
of software - "HAMBLEY & BOWES IN AGREEMENT SHOCKER!!".

However the fact remains that, for whatever reasons, commonly-used
popular enterprise linux distributions still have ruby 1.8.6, with no
easy route to deploy a later version. Hell, the recently-released Fedora
13 still only has 1.8.6, and I seem to recall that RHEL6 beta also does.
So, there is no easy way (that I know of) to get ruby 1.8.7 (or above)
on RH-flavour platforms.

Now, you may find that unreasonable but the fact remains that 1.8.6 is
what a lot of folk have to work with - a situation that is not likely to
change for quite some time.

R.

Jon Chin

unread,
Jun 5, 2010, 3:54:10 AM6/5/10
to capis...@googlegroups.com
Hi Lee,

Thanks for the help.  That link got me started on the right track.  Since the .htaccess files get copied when I don't set copy_exclude at all, I think it's got to be an issue with rsync'ing it.  I'll check with my host to see what their settings are with hidden files.  Thanks!

Excalibur

unread,
Jul 27, 2010, 5:46:55 PM7/27/10
to Capistrano
Please see this thread:
https://capistrano.lighthouseapp.com/projects/8716/tickets/140-rsync-globbing-causes-hidden-files-to-be-skipped#ticket-140-6

It appears that the rsync command inside lib/capistrano/recipes/deploy/
strategy/remote_cache.rb uses a globbing wildcard (*) that does not
match dot files, (unless shopt -s dotglob) is explicitly enabled.

By removing the star wildcard, our installation of Capistrano has
never had a problem.

Arthur


On Jun 5, 1:54 am, Jon Chin <port23u...@gmail.com> wrote:
> Hi Lee,
>
> Thanks for the help.  That link got me started on the right track.  Since
> the .htaccess files get copied when I don't set copy_exclude at all, I think
> it's got to be an issue with rsync'ing it.  I'll check with my host to see
> what their settings are with hidden files.  Thanks!
>
>
>
> On Fri, Jun 4, 2010 at 3:02 AM, Lee Hambley <lee.hamb...@gmail.com> wrote:
> > John,
>
> > Looks like in that case the rsync|copy from the cached_copy to the release
> > directory is ignoring hidden files… Take a look at the definition here, and
> > see if you spot anything obvious:
> >http://github.com/capistrano/capistrano/blob/master/lib/capistrano/re...
>
> > Also, for the record you should be off 1.8.6 (not causing this problem) but
> > it is more then 2/3 years old, and completely obsolete now……
>
> > - Lee
>
> > On 4 June 2010 03:37, Jon Chin <port23u...@gmail.com> wrote:
>
> >> Oops, sorry about that.  Here's my environment:
> >> Ruby 1.8.6
> >> Capistrano 2.5.18
> >> Deploying with remote_cache from a git repository
>
> >> Thanks in advance for any suggestions/advice!
>
> >> On Thu, Jun 3, 2010 at 3:17 AM, Lee Hambley <lee.hamb...@gmail.com>wrote:
>
> >>> Please include all the information as requested on the Google groups
> >>> homepage… specifically in this instance:
>
> >>>    - Which deploy strategy are you using (:copy, for example relies on
> >>>    Tar, which behaves unexpectedly with hidden files)
> >>>    - What version of Cap, Ruby, Net::SSH and etc are you using ……
>
> >>> Thanks, Lee
>
> >>> On 3 June 2010 07:27, JonC <port23u...@gmail.com> wrote:
>
> >>>> I have Capistrano configured and it works perfectly...except that it
> >>>> doesn't seem to be copying my .htaccess files.  I've checked and they
> >>>> are in the repo with my other files.  The only explanation I can think
> >>>> of is that since I'm executing Capistrano from a Windows machine,
> >>>> maybe the .* files get ignored?  Has anybody else experienced this?
>
> >>>> --
>
> >>>> * 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<capistrano%2Bunsubscribe@googlegrou ps.com>For more options, visit this group at
> >>>>http://groups.google.com/group/capistrano?hl=en
>
> >>>  --
> >>> * 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<capistrano%2Bunsubscribe@googlegrou ps.com>For more options, visit this group at
> >>>http://groups.google.com/group/capistrano?hl=en
>
> >>  --
> >> * 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<capistrano%2Bunsubscribe@googlegrou ps.com>For more options, visit this group at
> >>http://groups.google.com/group/capistrano?hl=en
>
> >  --
> > * 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<capistrano%2Bunsubscribe@googlegrou ps.com>For more options, visit this group at
> >http://groups.google.com/group/capistrano?hl=en
Reply all
Reply to author
Forward
0 new messages