Here’s the punch line:
namespace :rake do
task :show_tasks do
run("cd #{deploy_to}/current; /usr/bin/rake -T")
end
end
This is a Capistrano task which invokes Rake on the remote server. It’s the obvious answer to a problem which has been vexing me for weeks. I’ve been trying, without success, to convert a nice little Rake task
require ’lib/hodel_3000_compliant_logger’
namespace :log do
desc "Annotate the logfile with a message. Options LOGFILE=xxx, MSG=xxx"
task :annotate do
logfile = ENV[’LOGFILE’] || "log/production.log"
puts "annotating #{logfile} with #{ENV[’MSG’]}"
logger = Hodel3000CompliantLogger.new(logfile)
logger.debug "ANN_#{ENV[’MSG’].to_s} (at #{Time.now.strftime("%Y-%m-%d %H:%M:%S")})"
end
end
WTF Why?
into a Capistrano task so that I could run it on the remote server. Yes, I can hear some of you laughing...
Content suppressed by ://URLFAN, for full article visit source
Can your DNS do this?From: ananelson.com
Post Date: 2008-01-12 08:25:14
The internet is all about instant gratification. That goes for producers as well as consumers. Generally the biggest shock a novice web developer will experience is when they realize that their shiny new domain won’t be accessible for up to 2 days. 2 days? DAYS? That’s an eternity on the web. Not only do you have to wait, but you have to wait an unpredictable amount of time, and just because the domain name has propagated to you doesn’t mean the rest of the world will be able ...
more Screencasts are so 2005From: ananelson.com
Post Date: 2007-12-17 14:37:03
Update: you don’t need Skitch invites anymore, just sign up .
Screencasts are powerful things. I’m one of the many people who discovered Rails (yes, and TextMate) thanks to the original screencast. My first encounter with online screencasts was a little earlier, the company Marketcircle produced excellent screencast tutorials for DayLite , their productivity application (and one of the best OSX apps ever). This was a novelty at the time, and very effective. The...
more Microsoft’s Inner Geek is ShowingFrom: ananelson.com
Post Date: 2007-12-13 15:54:25
If you’re like me, you will have completely ignored the many announcements about Silverlight , Microsoft’s new framework for media-rich web applications. A few positive reports from unexpected sources did reach my ears, but they weren’t really enough to broach the Microsoft-impermeable membrane which has built up over the years. Even if I had been lucky enough to get to RubyConf this year, I probably would have skipped the IronRuby presentation .
So, I was surprised to fin...
more