0

So, it's my first project, which I am deploying with capifony. Everything seems fine, but I can't run grunt and bower commands on vps.

This is what I am trying to do in my deploy.rb file:

after "deploy" do
  run "cd #{current_path}; npm install -g grunt-cli"
  run "cd #{current_path}; npm install grunt --save-dev"
  run "cd #{current_path}; npm install"
  run "cd #{current_path}; bower install --allow-root"
  run "cd #{current_path}; grunt"
end

And I get a lot of errors, which looks like that:

http://pho.to/94cII/t4

How should I do that in a right way?

Steeler
  • 13
  • 2
  • 7

2 Answers2

0

My bad, everything went fine. Just the red log messages, and err statement let me to thought, that it was a failed attempt.

But anyway, is my solution is appropriate?

Steeler
  • 13
  • 2
  • 7
0

Yeah, it sounds like a good solution.

If you want to avoid errors display, add the parameter --quiet to the npm install command . This will only display warnings and errors, instead of all http responses.

Would be something like this:

after "deploy" do
  run "cd #{current_path}; npm install -g grunt-cli --quiet"
  run "cd #{current_path}; npm install grunt --save-dev --quiet"
  run "cd #{current_path}; npm install --quiet"
  run "cd #{current_path}; bower install --allow-root"
  run "cd #{current_path}; grunt"
end
Nacho Moço
  • 460
  • 3
  • 7
  • While I was working with that, I had found a better solution. Components should be installed locally and than deployed. Capifony could be configured like that - if you don't do any changes to the files, they won't be deployed again. You need this line: `set :deploy_via, :rsync_with_remote_cache` – Steeler Jun 24 '15 at 22:11