# Nomethoderror : undefined method post

**URL:** <https://www.ruby-forum.com/t/nomethoderror-undefined-method-post/173269>\
**Category:** Rails\
**Created:** [August 6, 2009, 1:26am UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-post/173269 "2009-08-06T01:26:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jyothsna](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jyothsna](https://www.ruby-forum.com/u/jyothsna)\
**Post date:** [August 6, 2009, 1:26am UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-post/173269/1 "2009-08-06T01:26:17Z")

</div>

HI,

I am trying out some examples form this book “Build Your Own Ruby on  
Rails Web Applications”

I have two views app/views/story/01-new.rhtml and exact ditto  
app/views/story/new.rhtml except the action is pointed correctly to  
itself in both 01-new.rhtml and new.rhtml.

I started the server and I can access localhost:3000/story/01-new.rhtml.

but when I try to access localhost:3000/story/new.rhtml, it says  
nomethoderror: undefined method ‘post’

I don’t have the code with me right now. but I can add it later.

I appreciate if anybody can help me out. the question is how come  
01-new.rhtml gets rendered but not new.rhtml given both have same code  
and

 for 01-new.rhtml and 

Thanks,  
–Jyothsna

---

<div class="post-metadata">

**Author:** ![jyothsna](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/aca169/32.png) [@jyothsna](https://www.ruby-forum.com/u/jyothsna)\
**Post date:** [August 6, 2009, 8:03am UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-post/173269/2 "2009-08-06T08:03:39Z")

</div>

Hi Jyothsna Vu

> 

It is normally route are  
gennerated for new Please tell how did u generate all? Did u use  
scaffold etc

Sijo
