Capistrano also has built-in support for git submodules, which won't get checked out by default. This is handy if you are tracking plugins or rails as submodules. Turn it on with this setting:
set :git_enable_submodules, 1
Excellent screencast! I was using an "after deploy" task to regen restart.txt and couldn't figure out how to get rid of the "missing pid" error. Moving it into the :deploy namespace was just what I needed.
Is there an easy way to access something like previous_release_path in the case that you want to copy something from the last release to the new release?
You lost me on the last step... I snapped my fingers, but my code didn't auto-document. Am I missing a gem or something? ;-)
Thanks for this screencast.
@Javan: Usually you don't copy from release to release. Anything that needs to be shared between releases should be put in the shared directory and symlinked from the releases/current directories.
Thanks for the screencast.
Maybe you can talk a little about webistrano next time. So you can use capistrano in a website so you can easily manage a bunch of websites and you can share symlinks.
Ryan,
Your screencasts are great. Like you, I had trouble understanding Capistrano at first. I found Ezra Zygmuntowicz's Deploying Rails Application book's Chapter 5 on Capistrano to be very helpful in getting the concepts straight, and after reading that last night had no trouble implementing a deploy script that I had been struggling with all week-end.
Bharat
One problem I am having is creating a Capistrano for Workling/Startling. I have created a task to start workling, everything executes properly but the process is never started.
Anybody has succefully created a Workling client start capistrano recipe ?
@Marcio, it's hard to say what the problem is without knowing the error message or the code. I recommend making a thread on a forum or mailing list where you can go into these details. It may have to do with a missing gem or config file.
Ryan,
Great screencast, one of many uses I have found for Capistrano is the ability to "automate" copying production database data to the development machine. Credit the code I re-used to http://marklunds.com/articles/one/339 although there are multiple other URLs with examples. It sure is useful to be able to automate repetitive tasks on the remote servers.
This was a great post. Our app has a large number of tutorial flash videos in the public folder. I've already started building in the separate asset uploads. Thanks for the tips.
Ryan,
although it has been said many times i have to say this one more time:
Your screencasts are absolutely outstanding and helped me A LOT.
Ryan,
You should really check out passenger recipes for Capistrano its maturing nicely and is very functional.
http://github.com/jtrupiano/passenger-recipes/tree/master
Capistrano extensions which is also required
http://github.com/jtrupiano/capistrano-extensions/tree/master
I did a little write-up about working with file assets and Capistrano deployments that people may be interested in:
http://almosteffortless.com/2007/03/25/working-with-attachment_fu/
Ryan,
I don't see how /shared/config/database.yml gets created.
Did you create the /shared/config directory and place the database.yml file into that directory manually before running the cap script.
Thanks for the screencasts!
There's also a 'deploy:cleanup' task that is really useful for limiting the number of releases:
http://pastie.org/343030
I believe putting the rsync task in there will run it on the server machine, where you probably want to run that on your local machine to rsync files from the local machine to the server.
Is there a way to run commands/tasks for deployment on the local machine?
Thanks, this helped tremendously.
Because of my total lack of knowledge about symlinks and Linux in general, I was a bit confused about something there.
In this example:
run "ln -nfs #{shared_path}/assets #{release_path}/public/assets"
the latter path links *to* the former, right? I.e. you create a symlink *from* #{release_path}/public/assets *to* #{shared_path}/assets
So, anything being saved to /public/assets actually ends up in the shared/assets folder.
Please tell me if I'm wrong.
Topics of interest but I could not understand the full ..
Fantastic, thanks. Have spent all day trying to work out how I could reconcile the fact that my apps have very large files and my shared hosting account has very small processor allocation. git seems to be a hungry beast and before total despair I found this railscast. hope this will resolve the issue!! thanks so much.
this is the most helpful thing i have come across for understanding capistrano. 8 mins instead of rereading the capistrano site and whatever else I could find 100 times.
@Sean - the shared folder gets created when you run cap deploy:setup. I'm not sure how the database.yml file got there though. If there isn't an automatic way to upload files in the shared folder, my guess is that ryan uploaded it there (via ftp or the like).
Maybe you should consider some kind of moderation system for these comments. "cheap wow gold"? Hmm...
<a href="http://www.baidu.com">baidu</a>
<a href="http://www.google.com">google</a>
baidu google
[url=http://www.baidu.com]baidu[/url]
[url=http://www.google.com]google[/url]
I am a seller from www.kickswiki.com. i also really want to know how it is going on. Thanks!
I've already started building in the separate asset uploads. Thanks for the tips. Thanks for this excellent and simple way to use presenter objects.
That was a great piece of information., I enjoyed reading it..,
The information you provided was very useful. Because of your help, thank you
http://www.barefivefingers.com It is a wonderful experience. I am really enjoying it.
Thanks for sharing your article. I really enjoyed it. I put a link to my site to here so other people can read it. My readers have about the same interets
Discount Wholesale Electronics, Wholesale Cell Phones, Electronic Gadgets and More from the Best Dropship Wholesaler
<p>Are you still confusing about choosing presents for your friends?Do you know where we can buy
a href="http://www.linkreplica.com/replica-watches-hublot-watches-c-409_443.html">Replica Hublot</a>
in the case that you want to copy something from the last release to the new release?
http://www.haircareessence.com Very great and informative post. Thanks a lot for sharing it
This website is awesome. I constantly come across something new & different right here. Thank you for that data.
Good article! Thank you so much for sharing this post.Your views truly open my mind.






