The maze book for programmers!
mazesforprogrammers.com

Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!

DRM-Free Ebook

The Buckblog

assorted ramblings by Jamis Buck

Capistrano 2.0 Preview 1

24 April 2007 — 1-minute read

It is with a great deal of excitement and anticipation that I announce the first preview release of Capistrano 2.0. This is not an official release, but simply the first of several attempts to get people using what will eventually be 2.0, so that we can iron out all the wrinkles. Thus, if you’re the enterprising, daring, and/or masochistic sort, I encourage you to give it a whirl:


gem install -s http://gems.rubyonrails.com capistrano

(WARNING. Capistrano 2.0 is not entirely backwards compatible with 1.x, so be sure to read this entire announcement before going all install happy!)

In addition to this preview release, I’m happy to announce the beginnings of Capistrano’s own web presence:

http://www.capify.org

There’s not much there right now, but it’ll grow quickly. Currently, the sections that might be of most interest are:

Upgrade guide:
http://www.capify.org/upgrade

What’s new in Capistrano 2.0:
http://www.capify.org/upgrade/whats-new

Read up on those, and if you’re still feeling brave, install away! Feel free to post feedback of any kind (whether it be on Capistrano 2.0, the website, or my own personal grooming habits) to the Capistrano mailing list (http://groups.google.com/group/capistrano).

Reader Comments

Awesome!

I agree on the awesome part. The thing i’m really waiting for are some real docs. The ones an the Rails site a) aren’t that great and b) are totally Rails specific. Capistrano’s something that can, and should, be used by everyone, not just Rails people. I’d be pushing it like a crack dealer if I knew there were docs the people i pushed it to could read and apply to their projects.

masukomi, the new capify.org site is being written with the idea that Cap is for more than just deploying rails apps. That said, the lion’s share of people using cap right now are using it to deploy rails apps, so initially the documentation will focus on that. Eventually, things will expand to include non-Rails usage, too. If you have anything specific you’d like documented, feel free to email me, or the cap list, and I’ll add it to my list.

“Lion’s share”, I thought that was a Dutch only thing. Funny when you see an expression literally translated.

Anyways, great work Jamis! I was pretty happy with 1.x but I’m sure 2.x will bring me some more goodies. Variable passing a la STAGE=production is very nice.

Speaking of documentation, the server at manuals.rubyonrails.com seems to be down (and has been down for a while). Jamis, do you have any connections to get this back up and running?

Jeff, it won’t be coming back. Those manuals were very out of date, and I had no way to update them (the login mechanism was broken). Thus, they’re gone. http://www.capify.org is going to replace them.

I use the following in my deploy script

==== buffer = render(:template => <<EOF #!/bin/sh -e rm -f #{current_path}/public/index.html curl http://#{server} &> /dev/null EOF )

Now, it cant find render. Any ideas how I can fix it?

Thanks

Deepak, ah, I’d forgotten about that gotcha. I removed “render”, because it is really about as simple as just calling ERB directly. so, in your case, something like:

1
2
3
4
5
6
require 'erb'
buffer = ERB.new(<<EOF).result(binding)
#!/bin/sh -e
rm -f #{current_path}/public/index.html
curl http://#{server} &> /dev/null
EOF

However, in your case…you aren’t really using any of the templating features of ERB, so you might as well just do this:

1
2
3
4
5
buffer = <<EOF
#!/bin/sh -e
rm -f #{current_path}/public/index.html
curl http://#{server} &> /dev/null
EOF

Thanks much!

Jamis,

Thanks for putting together this whole Cap thing, I enjoy it. I’ve been using the new version to deploy a new project, and one thing that’s not clear to me is why the restart task is not in the application namespace. It seems similar to start and stop, for me. Perhaps there’s more to the story…