Created
October 31, 2012 06:56
-
-
Save shakthimaan/3985530 to your computer and use it in GitHub Desktop.
rbuf_fill execution expired
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired (Timeout::Error) | |
from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill' | |
from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' | |
from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline' | |
from /usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line' | |
from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_new' | |
from /usr/lib/ruby/1.8/net/http.rb:1051:in `request' | |
from /usr/lib/ruby/1.8/net/http.rb:948:in `request_get' | |
from /usr/lib/ruby/1.8/net/http.rb:380:in `get_response' | |
from /usr/lib/ruby/1.8/net/http.rb:543:in `start' | |
from /usr/lib/ruby/1.8/net/http.rb:379:in `get_response' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
def get_users_from_api | |
users = Hash.new | |
uri = URI.parse(@USER_URL + "/users/show.json") | |
response = Net::HTTP.get_response(uri) | |
body = JSON.parse(response.body) | |
body.each do |x| | |
users[x["id"]] = x["name"] | |
end | |
return users | |
end | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment