Here's a summary of what I stumbled upon when trying to implement the delete feature using the link_to method and how to solve it.
I got a routing error like "I searched for HTTP [GET], but there is no such thing".
Since the link_to method is the role of the a tag in HTML, it is mainly used when transitioning pages. Therefore, unless you specify a method, the HTTP method will be GET.
As mentioned earlier, the link_to method is GET by default, so you need to specify the method separately.
It's a trick, but change the link_to method to the button_to method. The design changes a little, but the function can be implemented as intended.
In Rails6, webpack was the default, and it seemed that it didn't load properly. Until now, this error did not occur, but since I started making original applications, I have come to see it ... The cause is still a mystery.