我是Rails的新手。我目前正在使用 ruby.railstutorial.org 在线教程。我坚持第 5 章。当我尝试在我的机器上运行示例应用程序时,返回以下错误:
NoMethodError in Static_pages#home
Showing C:/rails_project/next_app/app/views/layouts/application.html.erb where line #4 raised:
undefined method `full_title' for #<#<Class:0x32de058>:0x32e47a8>
Extracted source (around line #4):
1: <!DOCTYPE html>
2: <html>
3: <head>
4: <title><%= full_title(yield(:title)) %></title>
5: <%= stylesheet_link_tag "application", media: "all" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
Rails.root: C:/rails_project/next_app
小解释:我已将名称从“Sample_app”更改为“Next_app”
感谢帮助!
附言。对不起我的英语不好。