 <p>The turbolinks gem caused the problem.</p> <p>Solved by following these tips here: <a href="http://reed.github.io/turbolinks-compatibility/twitter.html" rel="nofollow">http://reed.github.io/turbolinks-compatibility/twitter.html</a></p> <p><a href="http://reed.github.io/turbolinks-compatibility/facebook.html" rel="nofollow">http://reed.github.io/turbolinks-compatibility/facebook.html</a></p>