【发布时间】:2010-02-09 11:17:04
【问题描述】:
我正在按照主人的指示进行我的第一次 Rails 部署并使用 capistrano:
我有域名 plantality.com。
我已经为我的应用创建了 gws 文件夹。
我已经安装了 capistrano,并按照我能找到的所有 wiki 说明进行操作。
public_html 指向 gws/public,但 capistano 已将我的应用安装到 gws/current
我已经仔细检查了我的 deploy.rb 路径是否正确。
我在 gws/public 和 public_html 之间创建了一个符号链接(我尝试在 gws/current/public 和 public_html 之间创建一个符号链接,但没有帮助。
如果有什么不同,我会尝试使用Passenger。
这是我的 deploy.rb:
set :user, 'plantali'
set :scm_username, 'solent'
set :scm_password, '<removed>'
set :svnserver, 'plantality.sourcerepo.com'
set :application, "gws"
set :repository, "http://#{svnserver}/plantality/gws/gws"
set :server, 'plantality.com'
set :applicationdir, 'gws'
set :use_sudo, false
set :keep_releases, 5
set :scm, :subversion
role :web, "plantality.com" # Your HTTP server, Apache/etc
role :app, "plantality.com" # This may be the same as your `Web` server
role :db, "plantality.com", :primary => true # This is where Rails migrations will run
#role :db, ""
set :deploy_to, "/home/#{user}/#{applicationdir}"
set :group_writeable, false
【问题讨论】:
-
请注意,在上面的示例中,您不需要
:applicationdir指令。 Capistrano 约定只使用:application,因为假设应用程序目录名称将与应用程序名称相同。
标签: ruby-on-rails deployment directory capistrano