rails应用程序使用capistrano部署时的符号链接警告 [英] symlink warning during rails app deploy with capistrano

查看:137
本文介绍了rails应用程序使用capistrano部署时的符号链接警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我试图用capistrano部署我的rails应用程序时,我感到困惑。警告如下所示:[弃用警告]此API已更改,请钩挂部署:create_symlink而不是部署:符号链接

I'm confused by a warning I'm getting while trying to deploy my rails app with capistrano. The warning is as follows: [Deprecation Warning] This API has changed, please hook deploy:create_symlink instead of deploy:symlink

任何人都可以向我解释capistrano正在尝试去做?怎么解决这个问题?任何帮助将非常感谢!

Can anyone explain to me me what capistrano is trying to do? And how to fix this? Any help would be hugely appreciate!

哦,这是我的部署文件。

Oh, and this is my deploy file.

$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require "rvm/capistrano"                  # Load RVM's capistrano plugin.

set :application, "Project"

set :scm, "git"
set :repository,  "ssh://git@server.project.ca/usr/local/git_root/project.git"
set :user, "deploy"

#set :rvm_bin_path, "/usr/local/rvm/bin"
set :rvm_ruby_string, "ruby-1.9.2-p290@project"
set :normalize_asset_timestamps, false

ssh_options[:forward_agent] = true

set :branch, "master"

set :deploy_via, :remote_cache
set :deploy_to, "/usr/local/www/sites/project.example.ca/public/"

set :use_sudo, false

set :domain, 'project.example.ca'

role :app, domain
role :web, domain
role :db,  domain, :primary => true


推荐答案

今天也遇到这个警告。同意安德鲁,警告可能不是你的问题(如果你的部署文件有钩子部署:符号链接,那个警告是一个问题)。

also ran into this warning today. agree with andrew, the warning probably isn't your issue (if your deploy file had hooks into deploy:symlink, that warning would be a concern).

如果你'仍然对capistrano正在尝试做什么感兴趣,看起来这是版本2.11.2的变化,以确保部署:符号链接给出了一个弃用警告: https://github.com/capistrano/capistrano/issues/164

if you're still interested in what capistrano is trying to do, looks like this is a change in version 2.11.2 to ensure deploy:symlink gives a deprecation warning: https://github.com/capistrano/capistrano/issues/164

这篇关于rails应用程序使用capistrano部署时的符号链接警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆