开发者

vlad the deployer vlad:start_app with passenger issue

开发者 https://www.devze.com 2023-01-04 23:12 出处:网络
I\'m trying to deploy a rails app using vlad the deployer. I\'m using nginx and passenger. I have an issue with the vlad:start_app task.

I'm trying to deploy a rails app using vlad the deployer.

I'm using nginx and passenger.

I have an issue with the vlad:start_app task.

When I deploy I get the following issue

touch: cannot touch `/var/www/mysite.com/releases/20100623130302/tmp/restart.txt': No such file or directory
rake aborted!
execution failed with status 1: ssh mysite.com touch /var/www/mysite.com/releases/20100623130302/tmp/restart.txt

The issue is obvious in that the 20100623130302 in releases does not exist.

I would rather use the following task but cant override the default vlad:start_app task by placing this in my config/deploy.rb file.

namespace :vlad do

  desc 'Restart Passenger'
    remote_task 开发者_运维百科:start_app do
    run "touch #{current_path}/tmp/restart.txt"
  end

end

Any help appreciated. The options I though of are to either get the default vlad task to work or someway to override the default vlad task.


RAILS_ROOT/Rakefile is the file.


To override a task you have to remove the previous one first as defining the same task again just creates a second task that will run after the first one.

Here's an example from the vlad website how to replace a task:

namespace :vlad do
  # Clear existing update task so that we can redefine instead of adding to it.
  Rake.clear_tasks('vlad:update')

  remote_task :update, :roles => :app do
    #custom update stuff
  end
end
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号