title: SocketError: getaddrinfo: nodename nor servname provided when trying to access US Census Tigerline Shapefiles FTP server
body: <p>Trying to browse the US Census Department's Tigerline Shapefiles API and not getting any luck. Here's what I've tried:</p>
  
  <pre><code>require 'net/ftp'
  ftp = Net::FTP.new("ftp://ftp2.census.gov/geo/tiger/TIGER2010/BG/2010")
  SocketError: getaddrinfo: nodename nor servname provided, or not known
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/ftp.rb:228:in `initialize'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/ftp.rb:228:in `open'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/ftp.rb:228:in `block in open_socket'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/ftp.rb:223:in `open_socket'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/ftp.rb:248:in `block in connect'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/ftp.rb:247:in `connect'
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/net/ftp.rb:160:in `initialize'
      from (irb):2:in `new'
      from (irb):2
      from /Users/daviddouglas/.rvm/rubies/ruby-2.2.1/bin/irb:11:in `&lt;main&gt;'
  </code></pre>
  
  <p>This is an open FTP server that I can access with my browser and other tools. I can even directly reference specific file URL's on this server and download them successfully with <code>open-uri</code>. The FTP URL listed above however throws a bit of a curveball and displays a bunch of unexpected URL's, so I have to browse it and return a list of filenames to go forward.</p>
  
  <p>Thanks</p>