title: Rails. postgres can't cast Array to string
body: <p>I'm getting <strong>can't cast Array to string</strong> error on production where I'm using postgres and in local I'm using mysql. While creating certain videos I'm getting error only on production.</p>
  
  <p>In the below code videoid is nothing but id's of youtube videos which I'm getting from youtube</p>
  
  <pre><code>videoid = Video.parse_youtube(params[:video][:link]) if !params[:video].blank? and !params[:video][:link].blank?
                if videoid
              hash = video_info(videoid)
              if !hash["errors"]
                embed_code = "&lt;iframe width=\"560\" height=\"315\" src=\"#{hash['embed']}\" frameborder=\"0\" allowfullscreen&gt;&lt;/iframe&gt;"
                @video = Video.new(:name=&gt;hash["name"] , :embed_code=&gt; embed_code, :link=&gt; params[:video][:link], :youtube_id=&gt; videoid, :current_views =&gt; hash["current_views"], :initial_views =&gt; hash["current_views"],:uploaded_date =&gt; hash["uploaded"],:category =&gt; hash["category"])
              else
                @video = Video.new
              end
            else
              @video = Video.new
            end
  </code></pre>
  
  <p>i am not getting where the issue is.. It is working in mysql but its not working in postgres.</p>