【发布时间】:2015-10-15 10:15:34
【问题描述】:
我正在尝试按照 this 教程使用 Capistrano 部署 Angular 应用程序。所以在我的 Capfile 我有以下内容:
require 'capistrano/setup'
require 'capistrano/deploy'
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
在我的config/deploy 文件中,我有以下内容:
...
task :bower_and_npm_install do
on roles(:app), in: :sequence, wait: 5 do
within release_path do
execute :npm, "install"
execute :bower, "install"
end
end
end
after :published, :bower_and_npm_install
...
当我尝试部署时,我收到以下错误:
[6ff53bb3] Command: cd /home/user/apps/myapp/releases/20151015095546 && /usr/bin/env npm install
DEBUG [6ff53bb3] /usr/bin/env:
DEBUG [6ff53bb3] npm
DEBUG [6ff53bb3] : No such file or directory
我尝试了以下方法:
...
execute "bash -c '. /usr/bin/npm && cd #{current_path} && npm install'"
...
OR
execute "/usr/bin/npm && cd #{current_path} && npm install'"
OR
execute "cd #{current_path} && npm install'"
但没有一个奏效。
有什么想法吗?
【问题讨论】:
标签: angularjs capistrano3