title: Heroku App: RestClient::InternalServerError
body: <p>I have built a web app at myapp.heroku.com where "myapp" is actually the random name generated by heroku. When I hit it with my web browser it works. When I hit it with Ruby Rest-Client (gem rest-client v1.6.3) as follows:</p>
  
  <pre><code>irb(main):024:0&gt; response=RestClient.get "http://myapp.heroku.com"
  </code></pre>
  
  <p>It craps out with the following:</p>
  
  <pre><code>RestClient::InternalServerError: 500 Internal Server Error
      from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rest-client-    1.6.3/lib/restclient/abstract_response.rb:48:in `return!'
      from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rest-client-1.6.3/lib/restclient/request.rb:228:in `process_result'
      from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rest-client-1.6.3/lib/restclient/request.rb:176:in `block in transmit'
      from C:/Ruby192/lib/ruby/1.9.1/net/http.rb:627:in `start'
      from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rest-client-1.6.3/lib/restclient/request.rb:170:in `transmit'
      from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rest-client-1.6.3/lib/restclient/request.rb:64:in `execute'
      from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rest-client-1.6.3/lib/restclient/request.rb:33:in `execute'
      from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rest-client-1.6.3/lib/restclient.rb:68:in `get'
      from (irb):24
      from C:/Ruby192/bin/irb:12:in `&lt;main&gt;'
  </code></pre>
  
  <p>When I use the same client with better known URLs, such as "http://www.google.com", or "http://www.heroku.com", it works fine, the content of the URL downloads, and everything is good. When I use the same client with a version of the application running at "http://localhost:3000", it works fine too. </p>
  
  <p>Am I missing something in my rest-client client which prevents it from GETting data from an app hosted at heroku.com?</p>
  
  <p>============  EDIT ==== additional info ===========</p>
  
  <p>After sleeping on it, I tried:</p>
  
  <pre><code>irb&gt; require 'net/http'
  irb&gt; NET::HTTP.get_print URI.parse "http://myapp.heroku.com"
  </code></pre>
  
  <p>It worked fine. </p>