title: Failed to open TCP connection to :80 HTTParty gem
body: <p>So in my course on Coursera I'm required to build this rather simple aplication to obtain and display an array from an external api. I'm using the ruby on rails framework. (I'm using windows 10)</p>
  
  <p>Controller  -</p>
  
  <pre><code>class CoursesController &lt; ApplicationController
    def index
      @search_term = params[:looking_for] || 'jhu'
      @courses = Coursera.for(@search_term)
    end
  end
  </code></pre>
  
  <p>Model </p>
  
  <pre><code>class Coursera 
      include HTTParty
      default_options.update(verify: false) # Turn off SSL verification
      base_uri 'https://api.coursera.org/api/courses.v1'
      default_params fields: "photoUrl,description",q: "search"
      format :json
  
      def self.for term
          get("",query: {query: term}) ["elements"]
      end
  end
  </code></pre>
  
  <p>The view is irrelevant as this works fine.
  But in my other app , I get this error - </p>
  
  <pre><code>Errno::ECONNREFUSED: Failed to open TCP connection to :80 (Connection refused - connect(2) for nil port 80)
  </code></pre>
  
  <p>This is the other app which I'm having the problem with - </p>
  
  <p>Controller - </p>
  
  <pre><code>class RecipesController &lt; ApplicationController
    def index
      @search_term = params[:search] || 'chocolate'
      @recipes = Recipe.for @search_term
  
    end
  
  end
  </code></pre>
  
  <p>Model - </p>
  
  <pre><code>class Recipe
      include HTTParty
      default_options.update(verify: false) # Turn off SSL verification
      key_value = ENV['FOOD2FORK_KEY']
      hostport = ENV['FOOD2FORK_SERVER_AND_PORT'] || 'food2fork.com'
      base_uri = "https://doesntmatter.com/api"  #website mentioned here         
                                 #doesn't matter , I get the error nonetheless
      default_params key: ENV['FOOD2FORK_KEY'] ,q: "search"
      format :json
      def self.for term
          get("/search",query: {query: term}) ["recipes"]
      end
  
  end
  </code></pre>
  
  <p>I've tried disabling all possible firewalls , unblocked all ports with TCP in windows firewall , but I still get the same error. Any ideas how to fix this ? Because I don't think its a problem in my code yet...</p>