From: "Jesús Gabriel y Galán" Date: 2010-09-03T23:32:30+09:00 Subject: Re: Read cookie 2010/9/3 Pål Bergström : > Brian Candler wrote: > >> In what framework? CGI? Rack? Rails? Sinatra? Other? > > Btw, I'm not sure I follow.  Does it have to be within a framework? > Isn't the framework built with ruby in the first place? Never mind > Rails. I don't need the cookie there. That's easy. I need it in a script > in /lib. So, you need to make a request to a site and get the cookie that the server sends back? If that's the case then try this: require 'mechanize' agent = WWW::Mechanize.new page = agent.get("http://www.google.com") p agent.cookies Jesus.