Note that the restart task needs to be in the deploy namespace:

  namespace :deploy do
    task :restart, :roles => :app do
      # ...
    end
  end

Otherwise, you're not overriding deploy:restart, as you probably are intending.

- Jamis

On Apr 11, 2008, at 6:04 AM, Christian Johansen wrote:

Thanks for your help. The mongrel pids do indeed change, but no change
is visible on my webapp. This is my complete config/deploy.rb:

set :application, "myapp"
set :repository,  "https://svn.myserver.com/repos/myapp/trunk";

# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
# set :deploy_to, "/var/www/#{application}"
set :deploy_to, "/var/www/mysite/#{application}"

set :user, "christian"

# If you aren't using Subversion to manage your source code, specify
# your SCM below:
# set :scm, :subversion

role :app, "myserver.com"
role :web, "myserver.com"
role :db,  "myserver.com", :primary => true

task :restart, :roles => :app do
 # stop mongrel clusters for previous release and start for current
 run "cd #{previous_release} && mongrel_rails cluster::stop"
 run "sleep 5"
 run "cd #{current_release} && mongrel_rails cluster::start"
end

# This fixed frustrating 'sudo: no passwd entry for app' error when cap
was trying
# to run the process start command as 'app' for some reason
set :runner, 'christian'

# Currently not using this
#task :copy_database_yml, :roles => :app do
#  db_config = "#{shared_path}/config/database.yml.production"
#  run "cp #{db_config} #{release_path}/config/database.yml"
#end
#
#after "deploy:update_code", :copy_database_yml

Aníbal Rojas wrote:
Does the mongrel processes pids change?

Would you post your whole cofing/deploy.rb file?

--
AnibalRojas
http://hasmanydevelopers.com
http://rubycorner.com
http://anibal.rojas.com.ve

On Apr 9, 3:23 am, Christian Johansen <[EMAIL PROTECTED]

--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to