Rake/Net::HTTP

Hello,

I have a class method in a class in my lib dir of my rails app which
basically fetches some URLs and stores them in a temp cache for
processing. When I run the code via the script/console it works fine,
but if I create a rake task to call it and then run that rake task it
moans:

rake workbooks:create
(in /users/mark/desktop/workbooks)
rake aborted!
wrong status line: "HTTP/1.1 0 "

I believe it is this line in the class method which is causing the
problem:

Net::HTTP.get_response(URI.parse(url_for_fetch)).body

Any clues?

Thanks,

~ Mark