Run from Capistrano
You can run shell commands from capistrano using the run method. For example, to create a symlink from the shared directory to the current directory, you’ll write
run "ln -nfs #{deploy_to}/shared/config/database.yml #{release_path}/config/database.yml"
run can also take a block like this
run "rsync /path/to/file host:/path/to/file" do |channel, stream, text|
logger.info "[#{stream}] #{text}"
output = case text
when /\bpassword.*:/i
"#{password}\n"
when %r{\(yes/no\)}
"yes\n"
end
channel.send_data(output) if output
end
When you run a command it might ask for your password. To handle this in capistrano, use send_data to send a response.
Check lib/capistrano/recipes/deploy/scm/subversion.rb on the capistrano gem to see how capistrano handles subversion commands.
RailsConf 2007 Keynote Videos
The keynote videos from RailsConf 2007 are now available online. Get them here.
DHH’s presentation is available here. DHH made a live demo showing REST and made a mistake. He said he wanted to show how easy it is to debug in Rails. I say the same thing when something goes wrong in my live demos.
January 2008 PhRUG Meet-up
A PhRUG meet-up was held on Jan 16, 2008 at Ateneo de Manila University sponsored by Admoo Labs. 30 people attended the event. I gave a presentation on ‘Website Development with Ruby on Rails’. Greg Moreno talked about RSpec.You can download a copy of my presentation here. Pictures are here.