I do not know if this is a common problem or not. But I have a strange problem in my Ruby on Rails application.
For example in Chrome:
When I click a link_to or I try to change page it will load, and load, and load and the page won't simply open. To open I need to click open in another tab and close the current tab, that way the page will be loaded correctly. I don't know what the hell is going on, It just started to happen from one moment to another.
In Firefox:
The problem above does not happen but it does not show me the most recent html unless I refresh with F5. Then it shows all the content corretly except the first time.
I am using Linux to run my project and it is localhost. Both scenarios are very strange and I think they are related somehow. I already cleared both caches in both browsers.
Update:
As suggested made a search for turbo links. I have the gem installed but the only place where I am using turbo links is in application.html.erb
.
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
Example:
When I click the Sign In property which is:
<li> <%= link_to "Sign up", new_member_registration_path, :class => 'navbar-link' %> </li>
The call is pending and does not move (at Chrome), here is a picture of the network:
There is no prints at my console logs, nothing it just gets stuck and do nothing.
Removing the turbolink feature from the application will solve your problem. Here are the steps:
I think the problem could be related with Turbolinks.
To check if that's the case try to disable it and check if problems still occur.
To disable Turbolinks you can follow these simple steps (http://blog.steveklabnik.com/posts/2013-06-25-removing-turbolinks-from-rails-4)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With