title: How to run shell commands on server in Capistrano v3?
body: <p>I'm new to Capistrano and I've tried using Capistrano's DSL to run shell commands on the server ('run', 'execute', etc.), but it appears that it was deprecated. After searching and searching for a functional equivalent, I still am lost.</p>
  
  <p>Current code:</p>
  
  <pre><code>desc 'Do something'
  task :do_something
    execute 'echo sometext'
  end
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>    cap aborted!
      undefined method `execute' for main:Object
      /Users/Justin/Dropbox/xxxx/xxxx/xxxx/Capfile:45:in `block (2 levels) in &lt;top (required)&gt;'
      /Users/Justin/.rvm/gems/ruby-2.0.0-p247/bundler/gems/capistrano-2dc1627838f9/lib/capistrano/application.rb:12:in `run'
      /Users/Justin/.rvm/gems/ruby-2.0.0-p247/bundler/gems/capistrano-2dc1627838f9/bin/cap:3:in `&lt;top (required)&gt;'
      /Users/Justin/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `load'
      /Users/Justin/.rvm/gems/ruby-2.0.0-p247/bin/cap:23:in `&lt;main&gt;'
      /Users/Justin/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
      /Users/Justin/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `&lt;main&gt;'
      Tasks: TOP =&gt; deploy:do_something
  </code></pre>