title: Social bar failing to reload in my Rails 4.2.6 application
body: <p>I have a Rails 4.2.6 hosted at Heroku. This is the <a href="http://portaldemocracia.herokuapp.com/" rel="nofollow noreferrer">link</a> to it.</p>
  
  <p>It happens that I am facing a very curious issue and maybe someone here may help me to solve it.</p>
  
  <p>My application has a social bar with Twitter, LinkedIn and Facebook share buttons. When I first navigate to the homepage, these buttons load perfectly. It will be like in this image:</p>
  
  <p><a href="https://i.stack.imgur.com/4Ckzz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4Ckzz.png" alt="enter image description here"></a></p>
  
  <p>But if I navigate to another page, say <a href="http://portaldemocracia.herokuapp.com/forum" rel="nofollow noreferrer">this</a>, and navigate back to the homepage, these buttons won't reload.</p>
  
  <p><a href="https://i.stack.imgur.com/Y6Cje.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y6Cje.png" alt="enter image description here"></a></p>
  
  <p>I really don't know what is happening and any help will be appreciated.</p>
  
  <p>Here are some elements which may be useful.</p>
  
  <p><strong>config/routes.rb</strong>:</p>
  
  <pre><code>Rails.application.routes.draw do
    root 'site#index'
    get '/forum',       to: 'site#forum',       as: :forum_disqus
    get '/deputados',   to: 'site#deputados',   as: :lista_deputados
    get '/senadores',   to: 'site#senadores',   as: :lista_senadores
    get '/mensagem',    to: 'site#mensagem',    as: :envio_mensagens
  end
  </code></pre>
  
  <p><strong>app/views/site/index.html.erb</strong>:</p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="col-md-7"&gt;
      &lt;div class="well well-sm news-box clearfix"&gt;
        &lt;%= render 'news' %&gt;
      &lt;/div&gt;
      &lt;div class="well well-sm editorial-box"&gt;
        &lt;%= render 'editorial' %&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="col-md-5"&gt;
      &lt;div class="well well-sm social-buttons clearfix"&gt;
        &lt;%= render 'social' %&gt;
      &lt;/div&gt;
      &lt;div class="well well-sm twitter-box"&gt;
        &lt;%= render 'twitter_camara' %&gt;
      &lt;/div&gt;
      &lt;div class="well well-sm twitter-box"&gt;
         &lt;%= render 'twitter_senado' %&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>app/views/site/_social.html.erb</strong>:</p>
  
  <pre><code>&lt;div class="botao-twitter"&gt;
    &lt;a href="https://twitter.com/share" class="twitter-share-button" data-url="http://portaldemocracia.herokuapp.com/" data-via="edvaldoajunior" data-lang="pt" data-size="large" data-hashtags="PortalDemocracia"&gt;Tweetar&lt;/a&gt;
    &lt;script&gt;!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');&lt;/script&gt;
  &lt;/div&gt;
  &lt;div class="botao-linkedin"&gt;
    &lt;script src="//platform.linkedin.com/in.js" type="text/javascript"&gt; lang: pt_BR&lt;/script&gt;
    &lt;script type="IN/Share" data-url="http://portaldemocracia.herokuapp.com/" data-counter="right"&gt;&lt;/script&gt;
  &lt;/div&gt;
  &lt;div class="botao-facebook"&gt;
    &lt;div class="fb-share-button" data-href="http://portaldemocracia.herokuapp.com/" data-layout="box_count"&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="botao-facebook"&gt;
    &lt;div class="fb-like" data-href="https://www.facebook.com/portaldemocracia" data-width="90" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This is the code related with Facebook API loading, in my <strong>app/views/layouts/application.html.erb</strong>, and it is the only part of my code related with the social bar in this file.</p>
  
  <pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt;
    &lt;script&gt;
      (function(d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.5&amp;appId=1623539961200011";
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));
  &lt;/script&gt;  
  </code></pre>