gpt4 book ai didi

ruby-on-rails - Capistrano 3 符号链接(symbolic link)公用文件夹

转载 作者:太空宇宙 更新时间:2023-11-03 16:45:05 24 4
gpt4 key购买 nike

我在使用 Capistrano 3.X
时遇到问题所以基本上我的应用程序有公共(public)文件夹,一些用户可以上传他们的文件夹。它可以是 public/a public/b 等等。当我像那样设置链接目录时

设置:linked_dirs,%w{ log tmp/pids tmp/cache tmp/sockets vendor/bundle public }

我收到错误:

I, [2016-01-23T05:09:48.343707 #27926]  INFO -- : Writing /home/deploy/blabla/
releases/20160123100938/public/assets/bootstrap/glyphicons-halflings-regular-
fe185d11a49676890d47bb783312a0cda5a44c4039214094e7957b4c040ef11c.woff2 rake
aborted! Errno::EEXIST: File exists @ dir_s_mkdir -
/home/deploy/blabla/releases/20160123100938/public/assets
/home/deploy/blabla/shared/bundle/ruby/2.2.0/gems/sprockets-
3.5.2/lib/sprockets/asset.rb:163:in `write_to'
/home/deploy/blabla/shared/bundle/ruby/2.2.0/gems/sprockets-3.5.2/
lib/sprockets/manifest.rb:192:in `block (2 levels) in compile'
/home/deploy/blabla/shared/bundle/ruby/2.2.0/gems/concurrent-ruby-
1.0.0/lib/concurrent/executor/safe_task_executor.rb:24:in `call'

我试图删除 Assets 文件夹,手动创建它。我不知道下一步该怎么做。

最佳答案

您可以将用户上传的文件夹放在另一个文件夹中,例如 uploaded_folders 然后

set :linked_dirs, %w{ log tmp/pids tmp/cache tmp/sockets vendor/bundle public/uploaded_folders public/system }

这应该可以解决

关于ruby-on-rails - Capistrano 3 符号链接(symbolic link)公用文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34962191/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com