报错 招聘网站6-2 rails s出错

Published on:

appledeMacBook-Pro:job-listing apple$ rails s
=> Booting Puma
=> Rails 5.0.0 application starting in development on http://localhost:3000
=> Run rails server -h for more startup options
Exiting
/Users/apple/job-listing/config/routes.rb:9:in block in <top (required)>': undefined methodresources' for main:Object (NoMethodError)

原因:config/routes.rb写入后边内容后报错 namespace :admin do
resources :jobs
end
原因:以上内容需要插入在最后的end前面,前边的操作是插入在end之后,所以报错。

Comments

comments powered by Disqus