这是配置config / puma.rb:
[WebMethod]
public static string ImageSave(Image[] image_objects)// images coming with ajax
{
//I want to save the images here.
return "OK!";
}
我需要在应用程序中获取目录的值,我不能使用directory '/var/www/myproject/current'
app_dir = File.expand_path("../../..", __FILE__)
environment 'production'
workers 1
threads 1,1
bind "unix://#{app_dir}/sockets/_puma_1.sock?umask=0111"
,因为我使用capistrano部署了我的项目,并且"#{Rails.root}"
返回了#{Rails.root}
。
当前文件夹仅是release / xxxxxxx的符号链接。
如何在程序中获取/var/www/myproject/release/2019091235...
。