Hello All, I am taking a programming class and I am running into some problems with a Rail program I am working on from a book called "Beginning Rails 3, Updated." The book is having me create a blog application and I get to the point where I run the rails web server. When the page loads there is a link that suppose to go to another page where I can create a new blog, in this case a "new articile." When I click on the link it takes me to a page Called "Action Controller: Exception Caught and the title of the page is "NoMethodError in Articles#new". I am still pretty new at this, and I am not sure what this means. I will list the full part of the error screen. If you need the rest, please let me know. Thank you! NoMethodError in Articles#new Showing C:/IS410/Programs/blog/app/views/articles/_form.html.erb where line #16 raised: undefined method `title'' for #<Article id: nil, created_at: nil, updated_at: nil> Extracted source (around line #16): 13: 14: <div class="field"> 15: <%= f.label :title %><br /> 16: <%= f.text_field :title %> 17: </div> 18: <div class="field"> 19: <%= f.label :body %><br /> Trace of template inclusion: app/views/articles/new.html.erb Rails.root: C:/IS410/Programs/blog -- Posted via ruby-forum.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
You do not have title column in your database , try generate a migration to add the missing columns -- kevin Sent with Sparrow (sparrowmailapp.com/?sig) On Wednesday, November 16, 2011 at 11:12 AM, Scott Sewares wrote:> Hello All, > > I am taking a programming class and I am running into some problems with > a Rail program I am working on from a book called "Beginning Rails 3, > Updated." The book is having me create a blog application and I get to > the point where I run the rails web server. When the page loads there is > a link that suppose to go to another page where I can create a new blog, > in this case a "new articile." When I click on the link it takes me to a > page Called "Action Controller: Exception Caught and the title of the > page is "NoMethodError in Articles#new". I am still pretty new at this, > and I am not sure what this means. I will list the full part of the > error screen. If you need the rest, please let me know. Thank you! > > NoMethodError in Articles#new > > Showing C:/IS410/Programs/blog/app/views/articles/_form.html.erb where > line #16 raised: > > > undefined method `title'' for #<Article id: nil, created_at: nil, > updated_at: nil> > > Extracted source (around line #16): > > 13: > 14: <div class="field"> > 15: <%= f.label :title %><br /> > 16: <%= f.text_field :title %> > 17: </div> > 18: <div class="field"> > 19: <%= f.label :body %><br /> > > Trace of template inclusion: app/views/articles/new.html.erb > > Rails.root: C:/IS410/Programs/blog > > -- > Posted via ruby-forum.com. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org (mailto:rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org). > For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
go to your app root folder and try running rake db:migrate On Wed, Nov 16, 2011 at 8:42 AM, Scott Sewares <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello All, > > I am taking a programming class and I am running into some problems with > a Rail program I am working on from a book called "Beginning Rails 3, > Updated." The book is having me create a blog application and I get to > the point where I run the rails web server. When the page loads there is > a link that suppose to go to another page where I can create a new blog, > in this case a "new articile." When I click on the link it takes me to a > page Called "Action Controller: Exception Caught and the title of the > page is "NoMethodError in Articles#new". I am still pretty new at this, > and I am not sure what this means. I will list the full part of the > error screen. If you need the rest, please let me know. Thank you! > > NoMethodError in Articles#new > > Showing C:/IS410/Programs/blog/app/views/articles/_form.html.erb where > line #16 raised: > > > undefined method `title'' for #<Article id: nil, created_at: nil, > updated_at: nil> > > Extracted source (around line #16): > > 13: > 14: <div class="field"> > 15: <%= f.label :title %><br /> > 16: <%= f.text_field :title %> > 17: </div> > 18: <div class="field"> > 19: <%= f.label :body %><br /> > > Trace of template inclusion: app/views/articles/new.html.erb > > Rails.root: C:/IS410/Programs/blog > > -- > Posted via ruby-forum.com. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
Thank you guys both your ideas worked great. My Rails project is now working. Thanks again! -- Posted via ruby-forum.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
Hello, I am trying to this project to work but I ran into this issue, the project is from a book called Beginning Ruby on Rails E-Commerce: From Novice to Professional. It references stuff from Rails 1.0. I am still new at using Ruby and Rails. Thanks for any help. NoMethodError in Admin/author#new Showing C:/IS410/Programs/emporium/app/views/admin/author/_form.html.erb where line #1 raised: undefined method `error_messages_for'' for #<#<Class:0x40f6d10>:0x45784e0> Extracted source (around line #1): 1: <%= error_messages_for ''author'' %> 2: 3: <p><label for="author_first_name">First name</label><br/> 4: <%= text_field ''author'', ''first_name'' %></p> Trace of template inclusion: app/views/admin/author/new.html.erb Rails.root: C:/IS410/Programs/emporium Application Trace | Framework Trace | Full Trace app/views/admin/author/_form.html.erb:1:in `_app_views_admin_author__form_html_erb__297742407_30546288'' app/views/admin/author/new.html.erb:4:in `_app_views_admin_author_new_html_erb__600623049_36434616'' -- Posted via ruby-forum.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.
Error messages for was removed in rails 3. It was extracted to a plugin, don''t remember exactly what the plugin was called but it''s in the rails GitHub repo. Rails has changed massively since 1.0 - I really would try and find some more up to date material to work from. Fred. Sent from my iPhone On 13 Dec 2011, at 18:59, Scott Sewares <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hello, > > I am trying to this project to work but I ran into this issue, the > project is from a book called Beginning Ruby on Rails E-Commerce: From > Novice to Professional. It references stuff from Rails 1.0. I am still > new at using Ruby and Rails. Thanks for any help. > > > NoMethodError in Admin/author#new > > Showing C:/IS410/Programs/emporium/app/views/admin/author/_form.html.erb > where line #1 raised: > > undefined method `error_messages_for'' for > #<#<Class:0x40f6d10>:0x45784e0> > > Extracted source (around line #1): > > 1: <%= error_messages_for ''author'' %> > 2: > 3: <p><label for="author_first_name">First name</label><br/> > 4: <%= text_field ''author'', ''first_name'' %></p> > > Trace of template inclusion: app/views/admin/author/new.html.erb > > Rails.root: C:/IS410/Programs/emporium > Application Trace | Framework Trace | Full Trace > > app/views/admin/author/_form.html.erb:1:in > `_app_views_admin_author__form_html_erb__297742407_30546288'' > app/views/admin/author/new.html.erb:4:in > `_app_views_admin_author_new_html_erb__600623049_36434616'' > > -- > Posted via ruby-forum.com. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en.