Thank you Jesus, but thats strange because I use the same value from the
web site and write it to the text file and this works fine. Further down
in the code I do this:

vStats.puts "#{time}  #{site.id}  #{int}\n"


Where I use the variable "int". Also, when I test this in irb I get
this:

irb(main):025:0> Site.all.each do |site|
irb(main):026:1* agent = Mechanize.new
irb(main):027:1> puts site.url
irb(main):028:1> end
http://www.pintamono.com
http://www.pintamono.com
=> [#<Site @id=1 @description="My web" @url="http://www.pintamono.com">,
#<Site @id=2 @description="My web2" @url="http://www.pintamono.com">]

-- 
Posted via http://www.ruby-forum.com/.