Re: First capistrano deploy question

mike
Thu, 23 May 2013 22:20:13 -0000

On Wednesday, May 22, 2013 1:26:06 PM UTC-4, Alfred Nutile
wrote:
>
> Seems like it went well. The site is there. And when I do an update and
> push to it with git and run cap deploy again I can see my edits in a file
> on the server but not on the webpage.
> For example
> if I go into the folder current and run "grep -rn
''testingcapdeploy1'' *"
>
> I get
>
> app/views/projects/show.html.erb:5:
>
> but if I visit the page that change is not seen in the actual page code.
>
> It is an apache passenger setup and otherwise works okay though soon I
> will switch to nginx.
>
> Thanks
> Al
>
> my cap deploy is below
>
> #$:.unshift(File.expand_path(''./lib'',
ENV[''rvm_path''])) # Add RVM''s lib
> directory to the
> require ''rvm/capistrano''  # Add RVM integration
> require ''bundler/capistrano''  # Add Bundler integration
>
> ssh_options[:forward_agent] = true
> set :deploy_via, :remote_cache
> #set :use_sudo, false
> load ''deploy/assets''
>
> set :application, "alsstuff2"
> set :user, "railsadmin"
> set :deploy_to, "/var/www/#{application}"
>
> set :repository, "file:///home/deploy/git/alsBlogRails.git/"
> set :local_repository, "file://."
> set :scm, :git
> set :branch, "master"
> default_run_options[:pty] = true
>
>
> # set :scm, :git # You can set :scm explicitly or Capistrano will make an
> intelligent guess based on known version control directory names
> # Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`,
> `subversion` or `none`
>
> role :web, "#####"                          # Your HTTP server,
Apache/etc
> role :app, "#####"                          # This may be the
same as your
> `Web` server
> role :db,  "#####", :primary => true # This is where Rails
migrations will
> run
> #role :db,  "your slave db-server here"
>
> # if you want to clean up old releases on each deploy uncomment this:
> # after "deploy:restart", "deploy:cleanup"
>
> # if you''re still using the script/reaper helper you will need
> # these http://github.com/rails/irs_process_scripts
>
> # If you are using Passenger mod_rails uncomment this:
> # namespace :deploy do
> #   task :start do ; end
> #   task :stop do ; end
> #   task :restart, :roles => :app, :except => { :no_release =>
true } do
> #     run "#{try_sudo} touch
>
#{File.join(current_path,''tmp'',''restart.txt'')}"
> #   end
> # end
>

You need to uncomment the lines at the end starting with "namespace :deploy
do".  It touches the file restart.txt in the tmp folder (changing the
modified date/time stamp).  Passenger checks the date/time stamp on that
file to see if any changes have been made.

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/ce8cbd11-f041-4fa7-a796-47c249ba0006%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.