set :stage, "office" if exists?(:stage) if stage == "office" print "\n stage: #{stage}" else puts "\n nothing special for stage: #{stage}" end end # works fine in tests, but running capistrano deploy, prints:nothing special for stage: office