# Getting error while studying rails

**URL:** <https://www.ruby-forum.com/t/getting-error-while-studying-rails/192467>\
**Category:** Rails\
**Created:** [July 30, 2010, 6:51pm UTC](https://www.ruby-forum.com/t/getting-error-while-studying-rails/192467 "2010-07-30T18:51:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [July 30, 2010, 6:51pm UTC](https://www.ruby-forum.com/t/getting-error-while-studying-rails/192467/1 "2010-07-30T18:51:25Z")

</div>

Hello, I was going through the tutorial in this link:

> **[Getting Started with Rails — Ruby on Rails Guides](https://guides.rubyonrails.org/getting_started.html#adding-a-link)**
>
> Getting Started with RailsThis guide covers getting up and running with Ruby on Rails.After reading this guide, you will know: How to install Rails, create a new Rails application, and connect your application to a database. The general layout of a...

Wehn I came to section 6.2, I added the link using following code  
\<%= link\_to “My Blog”, posts\_path %\>  
and I get this error:  
undefined local variable or method `posts\_path’ for #\<ActionView::Base:  
0xb5eb0888\>

Couldn’t figure where I have gone wrong. Any help?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![karthikeyan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/898d66/32.png) [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Post date:** [July 30, 2010, 6:55pm UTC](https://www.ruby-forum.com/t/getting-error-while-studying-rails/192467/2 "2010-07-30T18:55:31Z")

</div>

Got answr by googling. I must add

map.resource :posts

in congfig/routes.rb

Sorry!
