On Fri, Jan 13, 2012 at 21:18, thomas carlier <carlier.thomas / gmail.com> wrote:

> That's the problem, when i use the .csv file @form=nil
> if i replace the line
> post = WordpressSite.new(row[0], row[1], row[2])
> by
> post = WordpressSite.new("http://example.com", "user", "password")
> that's why i don't understand my mistake

I don't understand *when* you're having a problem.  Please answer
these questions separately and simply, so that we can get a solid
handle on that.

1) When is @form nil: when you use the row (as in the first example),
or when you use literal values (as in the second example), or both?

2) Assuming it's not both, then does the code do what you want, in the
*other* case?

3) Have you looked at what you're actually getting in "row"?  How does
it differ from what you pass as literal values?  Does there seem to be
any pattern to the difference?  Can you post a CSV file (fake so you
don't reveal passwords), along with what you get from the CSV parser
running on the same file?

-Dave

-- 
Dave Aronson, President, Dave Aronson Software Engineering and Training
Ruby on Rails Freelancing (Northern Virginia, Washington DC, or Remote)
DaveAronson.com, Codosaur.us, Dare2XL.com, & RecruitingRants.com (NEW!)
Specialization is for insects. (Heinlein) - Have Pun, Will Babble! (me)