You are missing a few #{}for string interpolation in the first argument Date.strptime. I think you want to say this:
Date.strptime("{ #{params[:year]}, #{params[:month]}, #{params[:day]} }", "{ %Y, %m, %d }")
Your call just passed this literal string to strptime:
"{ params[:year].to_s, :params[:month].to_s, params[:day].to_s }"
and without the values from paramsreplaced by in, I strptimedidn’t know what you said, was upset and raised an exception ArgumentErrorto indicate "invalid date".
to_s #{}, #{} , params (, , params , Rails).