Forum: Ruby on Rails Caching and Capistrano

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.
Joshua Schairbaum (Guest)
on 2006-03-24 18:21
(Received via mailing list)
I had an incredibly difficult time getting this to work correctly and I
have a couple of comments/questions, after the fact.

When using caching and Capistrano together, how have you set the
permissions on your RAILS_ROOT/public folder...or have you sent your
cache data to your document root?  I've got it working now, but of
course, it will break the next time I deploy.

I was thinking a about writing a Capistrano task that would create the
folder structure that I need and then setting the correct permissions.
The folder structure was unable to be created on it's own.  Admittedly
so, I'm not very good with Linux and permissions, but maybe there's a
really simple was around it.

Any feedback would be welcome.
Jens Kraemer (Guest)
on 2006-03-24 18:50
(Received via mailing list)
On Fri, Mar 24, 2006 at 05:16:06PM -0000, Joshua Schairbaum wrote:
> I had an incredibly difficult time getting this to work correctly and I
> have a couple of comments/questions, after the fact.
>
> When using caching and Capistrano together, how have you set the
> permissions on your RAILS_ROOT/public folder...or have you sent your
> cache data to your document root?  I've got it working now, but of
> course, it will break the next time I deploy.

I use something like that in my deploy.rb:

task :after_update_code do
  run "/bin/chgrp -R www-data #{release_path}/public"
  run "/bin/chmod -R g+w #{release_path}/public"
end

after checking out the last version, this changes group ownership of
the public folder to www-data (the group the web server runs as) and
grants group write permissions, so cache files may be written by the
server.

hth,
Jens
This topic is locked and can not be replied to.