问题描述
我正在阅读Hartl的《 Ruby on Rails示例》一书.在第11章中,您实现了删除请求,以允许用户删除其个人资料上的微博.但是,当我单击删除按钮时,我收到此路由错误:没有路由与[GET]/microposts/303匹配
与其他遇到相同问题的人发现了类似的帖子.但是似乎没有人找到解决此问题的明确方法.也许到了晚上还为时已晚,但我很沮丧.我知道这与js文件或jquery有关.
可以帮忙吗?
以下是详细介绍相同问题的其他帖子:
jQuery在删除时不起作用Michael Hartl的教程第11章采取的行动 路由错误没有路由匹配[GET]"/microposts/304-删除微帖-迈克尔·哈特(Michael Hartl)的railstutorial.org第11章 Hartl的ruby-on-rails教程第11章中的没有路线匹配"删除Micropost时发生错误-完全卡住了 这是Rails 3.1问题.查看您的页面标题-而不是jquery,它正在尝试加载不存在的"defaults.js". http://ruby.railstutorial.org/chapters/rails- 3-1#code:layout_rails_3_1_diff I'm reading through Hartl's book, Ruby on Rails by Example. In chapter 11, it has you implement delete requests to allow users to delete microposts on their profile. However when I click the delete button, I receive this routing error: No route matches [GET] /microposts/303" I've found similar posts with other people who have had the same problem. But no one seems to have figured out a clear way to resolve this issue. Maybe it is just too late at night but I am stumped. I know it has something to do with the js file or jquery. Can you please help? Here are the other posts detailing the same problem: jQuery not working at delete action on Michael Hartl's tutorial, chapter 11 It's a Rails 3.1 issue. Look at your page header -- instead of jquery, it's trying to load "defaults.js," which doesn't exist. http://ruby.railstutorial.org/chapters/rails-3-1#code:layout_rails_3_1_diff 这篇关于Micropost-路由错误没有路由匹配[GET]-删除Micropost的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!