Reputation: 517
I'am newbie in Rails. I'am currently working with ruby.railstutorial.org online tutorial. I've stucked on chapter 5. When I am trying to run sample app on my machine the following error is returned:
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
Little explanation: I've changed name from 'Sample_app' to 'Next_app'
Thanks for help!
Ps. Sorry for my english.
Upvotes: 1
Views: 272
Reputation: 885
I think you have missed defining the helper method full_title
See this
http://ruby.railstutorial.org/chapters/rails-flavored-ruby#code:title_helper
Upvotes: 2
Reputation: 2399
I take it you are doing the 'railstutorials.org' sample tutorial. By memory, you have to make sure the full_title method is defined in the helpers. Try defining it in the Application Helper.
Upvotes: 0