Forum: Ruby on Rails Git + Capistrano deploying Rails app in Mor.ph AppSpace

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
520b6d013b68d3e2b4418a19431e5b1d?d=identicon&s=25 Daniel Drehmer (Guest)
on 2009-05-22 19:20
(Received via mailing list)
I have a directory for images uploaded through the admin page of my
app.

But whenever I redeploy the app, the images in my local environment
overwrite those in the server (which is pretty much expected, although
undesirable).

I already tried using .gitignore and the exclude file to ignore the
folder, but it ends up erasing all the images of the folder in the
production environment after the deploy, which is even worse.

How do I configure git or the cap script to prevent this behavior (of
my local images overwriting the online ones after deploy)?

I do have to prevent this behavior by only managing my git commits and
a capistrano file, since morph app space doesn't provide any shell
access to the server...

I’m kind of desperate to solve this.

Sorry for any english mistakes… I’m not from an english speaking
country.
Dd2d775dea75b381edb1bbf0600a0907?d=identicon&s=25 Marnen Laibow-Koser (marnen)
on 2009-05-22 19:24
Daniel Drehmer wrote:
> I have a directory for images uploaded through the admin page of my
> app.
>
> But whenever I redeploy the app, the images in my local environment
> overwrite those in the server (which is pretty much expected, although
> undesirable).
>
> I already tried using .gitignore and the exclude file to ignore the
> folder, but it ends up erasing all the images of the folder in the
> production environment after the deploy, which is even worse.
>
> How do I configure git or the cap script to prevent this behavior (of
> my local images overwriting the online ones after deploy)?

Look at how cap deals with shared/log, then do something similar.  I
have code I can share if necessary.

> Sorry for any english mistakes� I�m not from an english speaking
> country.

Your English is fine!

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org
This topic is locked and can not be replied to.