From: Prabhas Gupte Date: 2008-04-03T16:48:44+09:00 Subject: Re: ArgumentError even if variable is set > If I do cgi.params['numdomains'].to_i then it returns another error: > undefined method `to_i' for []:Array (NoMethodError) Hence I did to_s first and then to_i. And it worked! Final code segment is: cgi.params['numdomains'].to_s.to_i Thanks Julian!! -- Posted via http://www.ruby-forum.com/.