title: Pg search gem doesn't work on Heroku
body: <p>I have problem with properly work pg_search gem on Heroku. On localhost works great, but when I try to search some expression on developer site always display empty result. I tried to inspect object of result, but nothing showed. In heroku console comand <em>PgSearch.multisearch("ruby")</em> working fine.</p>
  
  <p><strong>vocabulary.rb</strong></p>
  
  <pre><code># == Schema Information
  #
  # Table name: vocabularies
  #
  #  id         :integer          not null, primary key
  #  expression :string
  #  meaning    :string
  #  created_at :datetime         not null
  #  updated_at :datetime         not null
  #
  
  class Vocabulary &lt; ActiveRecord::Base
    include PgSearch
    multisearchable :against =&gt; [:expression, :meaning]
    belongs_to :user
    validates :expression, :meaning, presence: true
    default_scope -&gt; { order(updated_at: :desc)}
  end
  </code></pre>
  
  <p><strong>VocabulariesController</strong></p>
  
  <pre><code>class VocabulariesController &lt; ApplicationController
    def search
      if params[:search].present?
        @pg_search_documents = PgSearch.multisearch(params[:search]).paginate(:page =&gt; params[:page], :per_page =&gt; 4)
      else
        @pg_search_documents = Vocabulary.all
      end
    end
  end
  </code></pre>
  
  <p><strong>View:</strong></p>
  
  <pre><code>.searchbar_min
    =render 'layouts/searchbar'
  %table.table.table-striped
    %thead
      %tr
        %th Wyrażenie
        %th Znaczenie
        %th
        %th
        %th
  
    %tbody
      = will_paginate @pg_search_documents
      - @pg_search_documents.each do |pg_search_document|
        %tr
          =pg_search_document.inspect
          %td= pg_search_document.searchable.expression
          %td= HTML_Truncator.truncate(pg_search_document.searchable.meaning, 40).html_safe
          %td
            = link_to vocabulary_path(pg_search_document), class: "btn btn-link" do
              %i.glyphicon.glyphicon-eye-open
              Pokaż
          -if current_user &amp;&amp; current_user.admin?
            %td
              = link_to edit_vocabulary_path(pg_search_document), class: "btn btn-link" do
                %i.glyphicon.glyphicon-edit
                Edytuj
            %td
              = link_to vocabulary_path(pg_search_document), :method =&gt; :delete, :data =&gt; { :confirm =&gt; 'Jesteś pewny/a?' }, class: "btn btn-link" do
                %i.glyphicon.glyphicon-trash
                Usuń
  %br
    = will_paginate @pg_search_documents
  </code></pre>
  
  <p>Below there are few line of code with registered action when i try search expression: ruby. 
  Heroku logs:</p>
  
  <pre><code>2016-02-11T10:10:37.832351+00:00 heroku[router]: at=info method=GET path="/vocabularies/search?utf8=%E2%9C%93&amp;search=ruby" host=uidictionary.herokuapp.com request_id=37e83ee8-db63-4b45-a70f-4eca54287db2 fwd="84.10.16.142" dyno=web.1 connect=1ms service=181ms status=200 bytes=4388
  2016-02-11T10:10:38.104878+00:00 heroku[router]: at=info method=GET path="/assets/application-dd08fe2ece9bd6ce8ece8cf874543813ca1cab7fa569184002981bf9c3d5c2d8.css" host=uidictionary.herokuapp.com request_id=2803fdca-2057-430d-809c-7f4cf3cd4824 fwd="84.10.16.142" dyno=web.1 connect=1ms service=20ms status=304 bytes=133
  2016-02-11T10:10:38.283719+00:00 heroku[router]: at=info method=GET path="/assets/application-073c4fa35429da031792509534cc1edc2d1c5fe7b72d6a51ad0c80df3d0636eb.js" host=uidictionary.herokuapp.com request_id=1eff89eb-ca19-4b28-a8bf-1117ed113dd9 fwd="84.10.16.142" dyno=web.1 connect=1ms service=28ms status=304 bytes=133
  2016-02-11T10:10:39.019321+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=uidictionary.herokuapp.com request_id=c987cc45-848f-4ab9-a0fd-d9896b1b08e1 fwd="84.10.16.142" dyno=web.1 connect=1ms service=8ms status=304 bytes=133
  2016-02-11T10:11:10.614151+00:00 heroku[router]: at=info method=GET path="/vocabularies/search?utf8=%E2%9C%93&amp;search=ruby" host=uidictionary.herokuapp.com request_id=a1e0f447-305b-4aa6-956b-5dc2543eefad fwd="84.10.16.142" dyno=web.1 connect=1ms service=34ms status=200 bytes=4388
  2016-02-11T10:11:10.584974+00:00 app[web.1]: Started GET "/vocabularies/search?utf8=%E2%9C%93&amp;search=ruby" for 84.10.16.142 at 2016-02-11 10:11:10 +0000
  2016-02-11T10:11:10.597016+00:00 app[web.1]:   Rendered layouts/_searchbar.html.haml (1.0ms)
  2016-02-11T10:11:10.604687+00:00 app[web.1]:   PgSearch::Document Load (2.9ms)  SELECT  "pg_search_documents".* FROM "pg_search_documents" INNER JOIN (SELECT "pg_search_documents"."id" AS pg_search_id, (ts_rank((to_tsvector('simple', coalesce("pg_search_documents"."content"::text, ''))), (to_tsquery('simple', ''' ' || 'ruby' || ' ''')), 0)) AS rank FROM "pg_search_documents" WHERE (((to_tsvector('simple', coalesce("pg_search_documents"."content"::text, ''))) @@ (to_tsquery('simple', ''' ' || 'ruby' || ' '''))))) AS pg_search_ce9b9dd18c5c0023f2116f ON "pg_search_documents"."id" = pg_search_ce9b9dd18c5c0023f2116f.pg_search_id  ORDER BY pg_search_ce9b9dd18c5c0023f2116f.rank DESC, "pg_search_documents"."id" ASC LIMIT 4 OFFSET 0
  2016-02-11T10:11:10.611004+00:00 app[web.1]:   Rendered layouts/_bootstrap.html.haml (0.1ms)
  2016-02-11T10:11:10.612747+00:00 app[web.1]: Completed 200 OK in 24ms (Views: 12.3ms | ActiveRecord: 7.1ms)
  2016-02-11T10:11:10.588341+00:00 app[web.1]: Processing by VocabulariesController#search as HTML
  2016-02-11T10:11:10.588375+00:00 app[web.1]:   Parameters: {"utf8"=&gt;"✓", "search"=&gt;"ruby"}
  2016-02-11T10:11:10.591815+00:00 app[web.1]:   User Load (1.8ms)  SELECT  "users".* FROM "users" WHERE "users"."id" = $1  ORDER BY "users"."id" ASC LIMIT 1  [["id", 2]]
  2016-02-11T10:11:10.600817+00:00 app[web.1]:    (2.4ms)  SELECT COUNT(*) FROM "pg_search_documents" INNER JOIN (SELECT "pg_search_documents"."id" AS pg_search_id, (ts_rank((to_tsvector('simple', coalesce("pg_search_documents"."content"::text, ''))), (to_tsquery('simple', ''' ' || 'ruby' || ' ''')), 0)) AS rank FROM "pg_search_documents" WHERE (((to_tsvector('simple', coalesce("pg_search_documents"."content"::text, ''))) @@ (to_tsquery('simple', ''' ' || 'ruby' || ' '''))))) AS pg_search_ce9b9dd18c5c0023f2116f ON "pg_search_documents"."id" = pg_search_ce9b9dd18c5c0023f2116f.pg_search_id
  2016-02-11T10:11:10.612038+00:00 app[web.1]:   Rendered layouts/_navbar.html.haml (0.8ms)
  2016-02-11T10:11:10.606390+00:00 app[web.1]:   Rendered vocabularies/search.html.haml within layouts/application (10.7ms)
  </code></pre>
  
  <p>How to resolve problem?</p>