Invalid argument -

require ‘rubygems’
require ‘hpricot’
require ‘open-uri’
  doc = Hpricot(open(“”))
  @doc = doc.to_s.gsub(/“id.+?likes”:/,"").gsub("{","").gsub("}","")
   puts @doc
require ‘rubygems’
require ‘nokogiri’
require ‘open-uri’
# Get a Nokogiri::HTML:Document for the page we’re interested in...
doc = Nokogiri::HTML(open(‘’))
puts doc

These two .rb files working fine on my local but giving error
" Invalid argument -
(Errno::EINVAL)" On Server
if i remove line require 'open-uri' on my local error comes again on

Any Idea ?
Thanks in Advance ..

May be a issue with open-uri
Is some one face this error on server