title: Sinatra error with dashingio and rest-client
body: <p>I'm using rest-client in a dashingio job. Since adding code for rest-client I get the following error on <code>dashing start</code></p>
  
  <pre><code>/Users/emcevoy/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/sinatra-1.4.6/lib/sinatra/base.rb:1595:in `define_method': tried to create Proc object without a block (ArgumentError)
  </code></pre>
  
  <p>Gemfile</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'dashing'
  
  ## Remove this if you don't need a twitter widget.
  gem 'twitter', '&gt;= 5.9.0'
  </code></pre>
  
  <p>myjob.rb</p>
  
  <pre><code>  require "rubygems"
    require "json"
    require "rest-client"
    require "requests"
    require "pp"
  ...
    def post(theJson)
      theUrl = $location + $endpoint.to_str
      begin
          response = RestClient.post(theUrl, theJson, :content_type =&gt; :json)
          if(response.code &gt; 204)
              $stderr.puts("Failed to post Json to endpoint " + theUrl + "\nReturn code: " + response.code.to_s)
              exit 1
          end
      rescue Errno::ECONNREFUSED
          $stderr.puts("Server refusing connection!")
          exit 1
      end
      if(JSON.parse(response).has_key?("error")) then
          $stderr.puts("Returned an error...")
          $stderr.puts JSON.parse(response)["error"]
          exit 1
      end
      return(response)
    end
  </code></pre>