# Strange behavior with git and extensions(and Capistrano)

**URL:** <https://www.ruby-forum.com/t/strange-behavior-with-git-and-extensions-and-capistrano/197385>\
**Category:** Radiant CMS\
**Created:** [October 13, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/strange-behavior-with-git-and-extensions-and-capistrano/197385 "2010-10-13T16:52:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![okkezSS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/85f322/32.png) [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Post date:** [October 13, 2010, 4:52pm UTC](https://www.ruby-forum.com/t/strange-behavior-with-git-and-extensions-and-capistrano/197385/1 "2010-10-13T16:52:23Z")

</div>

I have googled and read all I can find, but with my limited knowledge,  
I cant seem to figure out what is going on, any help would be awesome,  
as I cant find anyone having the same problem.

my setup is a local version of radiant with two custom extensions, and  
few installed ones (mailer, mediamaid, settings, share\_layouts). I  
have a git repo of the project that I can cap deploy to my server  
successfully, but the extensions that I installed do not get copied  
up, meaning that the ‘folder’ gets added to git and and empty folder  
is pushed to the server.

I verify this with ssh and sure enough, the folders are empty.

So I do a little inspection and alter some files in a few of the  
extensions (adding spaces and such), and then do a git status, with no  
change.

My question is, If I have to install extensions on my server manually  
via ssh, why is git sending an empty folder. And why is git not  
seeing changes?

Thanks for any insight.

---

<div class="post-metadata">

**Author:** ![blake](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blake](https://www.ruby-forum.com/u/blake)\
**Post date:** [October 13, 2010, 5:21pm UTC](https://www.ruby-forum.com/t/strange-behavior-with-git-and-extensions-and-capistrano/197385/2 "2010-10-13T17:21:11Z")

</div>

On Wed, Oct 13, 2010 at 9:51 AM, Blake [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> my setup is a local version of radiant with two custom extensions, and  
> few installed ones (mailer, mediamaid, settings, share\_layouts). I  
> have a git repo of the project that I can cap deploy to my server  
> successfully, but the extensions that I installed do not get copied  
> up, meaning that the ‘folder’ gets added to git and and empty folder  
> is pushed to the server.

i believe `./script/extension install` adds extensions as git  
submodules. try adding:

set :git\_enable\_submodules, 1

to your config/deploy.rb file.

---

<div class="post-metadata">

**Author:** ![blake](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blake](https://www.ruby-forum.com/u/blake)\
**Post date:** [October 16, 2010, 5:31am UTC](https://www.ruby-forum.com/t/strange-behavior-with-git-and-extensions-and-capistrano/197385/3 "2010-10-16T05:31:20Z")

</div>

thanks john, I just tried that and it does add the extensions, but  
they are pulled from their original location (i.e. these are all  
hosted at github) but a couple of them have had to be altered by me  
to have them work on my server, and I want them to either  
a) have changes to /vendors/extensions/… be added with git add .  
b) ignore the folders all together and not create empty folders on the  
server.

Anyway , thanks again.  
Blake

---

<div class="post-metadata">

**Author:** ![blake](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/a9a28c/32.png) [@blake](https://www.ruby-forum.com/u/blake)\
**Post date:** [October 16, 2010, 7:09am UTC](https://www.ruby-forum.com/t/strange-behavior-with-git-and-extensions-and-capistrano/197385/4 "2010-10-16T07:09:43Z")

</div>

On Fri, Oct 15, 2010 at 11:30 PM, Blake [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> thanks john, I just tried that and it does add the extensions, but  
> they are pulled from their original location (i.e. these are all  
> hosted at github) but a couple of them have had to be altered by me  
> to have them work on my server, and I want them to either  
> a) have changes to /vendors/extensions/… be added with git add .  
> b) ignore the folders all together and not create empty folders on the  
> server.

If you’ve pulled extensions from github and committed changes to them,  
the submodule will fail because the submodule will point to a commit  
that doesn’t exist at the source (github). You should see errors from  
capistrano during your deployment, what errors do you get?

You can add content to your main project without submodules by adding  
the extension paths with a trailing slash.

Add a submodule path like this vendor/extensions/something  
Add actual content like this vendor/extensions/something/

Note the trailing slash.

Does this help?
