The hint is in how Stack Overflow has syntax-highlighted your program text:
"new.tsv_body := to_tsvector('english', coalesce("products"."name"::text, '')) .... )
^^^^^^^^^^ ^^^^^^
You've included double-quotes around the table and column names. The whole string is in double quotes. So these inset double quotes end the string.
You'll need to escape them, or omit them. I don't do Ruby / Rails, but if it's anything like most languages, backslash escapes are appropriate:
"new.tsv_body := to_tsvector('english', coalesce(\"products\".\"name\"::text, '')) .... )