I followed a RoR guide at http://guides.rubyonrails.org/getting_started.html
.
At 6.2(Adding a link) ,i got a error.I Open app/views/home/
index.html.erb and modify it as follows:
<h1>Hello, Rails!</h1> <%= link_to "My Blog",
posts_path %>
Now started server ,and when i click on "My
blog",it gave following error
NameError in Posts#index
Showing /home/amrit/blog/app/views/posts/index.html.erb where line #28
raised:
undefined local variable or method `new_posts_path'' for
#<#<Class:
0xb67c1918>:0xb67c09f0>
The contents of app/view/posts/index.html.erb file are as follow
<h1>Listing posts</h1>
<table>
<tr>
<th>Name</th>
<th>Title</th>
<th>Content</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @posts.each do |post| %>
<tr>
<td><%= post.name %></td>
<td><%= post.title %></td>
<td><%= post.content %></td>
<td><%= link_to ''Show'', post %></td>
<td><%= link_to ''Edit'', edit_post_path(post)
%></td>
<td><%= link_to ''Destroy'', post, :confirm =>
''Are you
sure?'', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to ''New posts'', new_posts_path%>
I am using ubuntu 10.04 and rails 3.07.
Thanks
--
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
http://groups.google.com/group/rubyonrails-talk?hl=en.
I followed a RoR guide at http://guides.rubyonrails.org/getting_started.html
.
At 6.2(Adding a link) ,i got a error.I Open app/views/home/
index.html.erb and modify it as follows:
<h1>Hello, Rails!</h1> <%= link_to "My Blog",
posts_path %>
Now started server ,and when i click on "My
blog",it gave following error
NameError in Posts#index
Showing /home/amrit/blog/app/views/posts/index.html.erb where line #28
raised:
undefined local variable or method `new_posts_path'' for
#<#<Class:
0xb67c1918>:0xb67c09f0>
The contents of app/view/posts/index.html.erb file are as follow
<h1>Listing posts</h1>
<table>
<tr>
<th>Name</th>
<th>Title</th>
<th>Content</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @posts.each do |post| %>
<tr>
<td><%= post.name %></td>
<td><%= post.title %></td>
<td><%= post.content %></td>
<td><%= link_to ''Show'', post %></td>
<td><%= link_to ''Edit'', edit_post_path(post)
%></td>
<td><%= link_to ''Destroy'', post, :confirm =>
''Are you
sure?'', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to ''New posts'', new_posts_path%>
I am using ubuntu 10.04 and rails 3.07.
Thanks
--
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
http://groups.google.com/group/rubyonrails-talk?hl=en.
I followed a RoR guide at http://guides.rubyonrails.org/getting_started.html
.
At 6.2(Adding a link) ,i got a error.I Open app/views/home/
index.html.erb and modify it as follows:
<h1>Hello, Rails!</h1> <%= link_to "My Blog",
posts_path %>
Now started server ,and when i click on "My
blog",it gave following error
NameError in Posts#index
Showing /home/amrit/blog/app/views/posts/index.html.erb where line #28
raised:
undefined local variable or method `new_posts_path'' for
#<#<Class:
0xb67c1918>:0xb67c09f0>
The contents of app/view/posts/index.html.erb file are as follow
<h1>Listing posts</h1>
<table>
<tr>
<th>Name</th>
<th>Title</th>
<th>Content</th>
<th></th>
<th></th>
<th></th>
</tr>
<% @posts.each do |post| %>
<tr>
<td><%= post.name %></td>
<td><%= post.title %></td>
<td><%= post.content %></td>
<td><%= link_to ''Show'', post %></td>
<td><%= link_to ''Edit'', edit_post_path(post)
%></td>
<td><%= link_to ''Destroy'', post, :confirm =>
''Are you
sure?'', :method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to ''New posts'', new_posts_path%>
I am using ubuntu 10.04 and rails 3.07.
Thanks
--
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
http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi, Did you add a resources :posts at this routes? 2011/4/23 amrit pal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> I followed a RoR guide at > http://guides.rubyonrails.org/getting_started.html > . > At 6.2(Adding a link) ,i got a error.I Open app/views/home/ > index.html.erb and modify it as follows: > > <h1>Hello, Rails!</h1> <%= link_to "My Blog", posts_path %> > Now started server ,and when i click on "My > blog",it gave following error > > > NameError in Posts#index > > Showing /home/amrit/blog/app/views/posts/index.html.erb where line #28 > raised: > > undefined local variable or method `new_posts_path'' for #<#<Class: > 0xb67c1918>:0xb67c09f0> > > > The contents of app/view/posts/index.html.erb file are as follow > > <h1>Listing posts</h1> > > <table> > <tr> > <th>Name</th> > <th>Title</th> > <th>Content</th> > <th></th> > <th></th> > <th></th> > </tr> > > <% @posts.each do |post| %> > <tr> > <td><%= post.name %></td> > <td><%= post.title %></td> > <td><%= post.content %></td> > <td><%= link_to ''Show'', post %></td> > <td><%= link_to ''Edit'', edit_post_path(post) %></td> > <td><%= link_to ''Destroy'', post, :confirm => ''Are you > sure?'', :method => :delete %></td> > </tr> > <% end %> > </table> > > <br /> > > <%= link_to ''New posts'', new_posts_path%> > > > I am using ubuntu 10.04 and rails 3.07. > > Thanks > > -- > 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 > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Carina Brito Silva http://twitter.com/carinabs8 http://carinabs8.wordpress.com/ "...Estou disposto a demolir paredes,contruir pontes e acender fogueiras. Tenho uma grande experiência,um monte de energia,um pouco dessa coisa de ''visão'' e não tenho medo de começar do zero."-Steve Jobs -- 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 http://groups.google.com/group/rubyonrails-talk?hl=en.
On Apr 23, 2:20 am, Carina Brito <carina...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > Did you add a resources :posts at this routes?error is solved .was syntax error. Thanks -- 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 http://groups.google.com/group/rubyonrails-talk?hl=en.
Oh, ok ... =^^ 2011/4/23 amrit pal pathak <amritpalpathak1-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> > > On Apr 23, 2:20 am, Carina Brito <carina...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > > Did you add a resources :posts at this routes? > error is solved .was syntax error. > > Thanks > > -- > 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 > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- Carina Brito Silva http://twitter.com/carinabs8 http://carinabs8.wordpress.com/ "...Estou disposto a demolir paredes,contruir pontes e acender fogueiras. Tenho uma grande experiência,um monte de energia,um pouco dessa coisa de ''visão'' e não tenho medo de começar do zero."-Steve Jobs -- 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 http://groups.google.com/group/rubyonrails-talk?hl=en.