【发布时间】:2010-05-04 15:17:37
【问题描述】:
这是我第一次尝试设置 capistrano 来部署 rails 应用程序。我正在从我的本地机器部署到我的远程服务器,该服务器在同一台机器上拥有 repo、web、app 和 mysql 服务器。我正在关注此演练:http://www.capify.org/index.php/From_The_Beginning
我得到命令
cap deploy:start
然后我得到这个错误:
*** [err :: example.com] sudo: unknown user: app
command finished
failed: "sh -c 'cd /var/www/example/current && sudo -p '\\''sudo password: '\\'' -u app nohup script/spin'" on example.com
我应该添加一个“应用”用户,还是有办法更改命令运行的用户身份?
这是我的 deploy.rb:
set :application, "example"
set :repository, "git@example.com:example.git"
set :user, "trobrock"
set :branch, 'master'
set :deploy_to, "/var/www/example"
set :scm, :git
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "example.com" # Your HTTP server, Apache/etc
role :app, "example.com" # This may be the same as your `Web` server
role :db, "example.com", :primary => true # This is where Rails migrations will run
很明显,它说 example.com 是我的服务器主机名,而它只是说 example 的每个地方都是应用程序名称。
【问题讨论】:
标签: ruby-on-rails ruby deployment capistrano