Upgrade to Rails 5 link not working

After I upgrade this particular rails app to rails 5. The links on the page is not clickable. After i click it, it is not redirecting.
But if i open it in a new page, it works fine.

Anybody know why?

After I upgrade this particular rails app to rails 5. The links on the page
is not clickable. After i click it, it is not redirecting.
But if i open it in a new page, it works fine.

I am afraid I do not understand what you are saying. First you say the
links are not clickable, then you say that if you click it does not
re-direct. What do you mean by that? Then you say if you open a new
page it works fine, what works fine? The link clicking?

So please explain the problem in more detail, first though have a look
at the page source html in the browser and see if the links look ok.
If that looks ok then look in the log see if there are any clues
there.

Also you have not said whether your automated tests work ok.

Colin

In the source code, i can see “Sign In
When I click it, it has no response. It is the same for any link or any button on the page.

Then if i copy the url to a new browser window, it will show the page properly.

In the source code, i can see "<a class="btn btn-success"
href="/account/sign_in">Sign In</a>"
When I click it, it has no response. It is the same for any link or any
button on the page.
Then if i copy the url to a new browser window, it will show the page
properly.

You have not replied to suggestion that you look in the log to see
what is shown there when you click the link (log/development.log).
Also I find it easier to follow the thread if you insert your reply at
appropriate points in the previous message. In this case I think you
would have been less likely that you would have failed to notice my
reference to the log if you had done that.

Also does the link look like a link normally does in the browser (in
blue or whatever the styling is setup to show links as). Does the url
show up in the browser when you hover over it?

When you say you copy the url to a new browser window which url do you mean?

I notice that you have also ignored my question about automated tests.
Does that mean there are none?

Please make sure to answer all questions, thanks.

Colin

In the source code, i can see “Sign In
When I click it, it has no response. It is the same for any link or any
button on the page.
Then if i copy the url to a new browser window, it will show the page
properly.

You have not replied to suggestion that you look in the log to see
what is shown there when you click the link (log/development.log).
Also I find it easier to follow the thread if you insert your reply at
appropriate points in the previous message. In this case I think you
would have been less likely that you would have failed to notice my
reference to the log if you had done that.

I opened up the log file. I didn’t see any issues. The page opens as normal. However, i click any links. There is no additional log in the file.

Also does the link look like a link normally does in the browser (in
blue or whatever the styling is setup to show links as). Does the url
show up in the browser when you hover over it?

Yes. the style looks right and it shows up the correct link.

When you say you copy the url to a new browser window which url do you mean?

I was trying to say the URL for the link is correct and working. 

I notice that you have also ignored my question about automated tests.
Does that mean there are none?

Yeah.. I haven’t written any auto test yet. I am about to start writing them.

Please make sure to answer all questions, thanks.

Sorry for the confusing. Thank you very much.

In the source code, i can see “Sign In
When I click it, it has no response. It is the same for any link or any
button on the page.
Then if i copy the url to a new browser window, it will show the page
properly.

You have not replied to suggestion that you look in the log to see
what is shown there when you click the link (log/development.log).
Also I find it easier to follow the thread if you insert your reply at
appropriate points in the previous message. In this case I think you
would have been less likely that you would have failed to notice my
reference to the log if you had done that.

I opened up the log file. I didn’t see any issues. The page opens as normal. However, i click any links. There is no additional log in the file.

Try disabling turbolinks

Colin

I disabled turbolink. I put ‘data-turbolinks-track’ => false in the application template
I also removed turbolink gem. But still not working. Still does the same thing.

No need to remove the gem itself, just take it out of Gemfile and
bundle install.

Two more things to try, check in the browser console window that there
are no errors when it loads the page or you click the link. Then
copy/paste the complete page source (in the browser) into the html
validator at https://validator.w3.org/#validate_by_input and fix any
errors.

Colin

There is no issue with turbolink nor with any page source.
Then when i go through my gem file, i found an old gem which i don’t need anymore. I checked and it is stated only support for rails 3-4. After I remove it, it works fine now.

Thank you for all your help.

What was the gem causing the conflict?

I believe it is ‘twitter_ratchet_rails’ this one.

There is no issue with turbolink nor with any page source.
Then when i go through my gem file, i found an old gem which i don't need
anymore. I checked and it is stated only support for rails 3-4. After I
remove it, it works fine now.
Thank you for all your help.

There certainly was an issue with the page source or javascript.
Probably the javascript. In this case caused by the gem. If there
had been no issue it would have worked.

However this has been useful as it has prompted me to add to my list
of things to check when upgrading - that all gems in Gemfile are
compatible with the new version.

Colin