Re: [Rails] Re: undefined method `posts_path'

2011-05-24 Thread John
On Tue, May 24, 2011 at 1:58 AM, john shelfer wrote: > > > On Mon, May 23, 2011 at 11:32 PM, Hassan Schroeder < > hassan.schroe...@gmail.com> wrote: > >> On Mon, May 23, 2011 at 8:17 PM, John shelfer >> wrote: >> >> > But to run a migration "rake db:migrate" is right command ,still >> > it didn't

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread john shelfer
On Mon, May 23, 2011 at 11:32 PM, Hassan Schroeder < hassan.schroe...@gmail.com> wrote: > On Mon, May 23, 2011 at 8:17 PM, John shelfer > wrote: > > > But to run a migration "rake db:migrate" is right command ,still > > it didn't run .why? > > That's what error messages tell you. But you have to

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread Hassan Schroeder
On Mon, May 23, 2011 at 8:17 PM, John shelfer wrote: > But to run a migration "rake db:migrate" is right command ,still > it didn't run .why? That's what error messages tell you. But you have to read them. -- Hassan Schroeder hassan.schroe...@gmail.com http://about.me/

[Rails] Re: undefined method `posts_path'

2011-05-23 Thread John shelfer
On May 23, 11:33 am, Hassan Schroeder wrote: > On Mon, May 23, 2011 at 8:06 AM, john shelfer wrote: > >> Also check that the database does now actually contain the posts table > >> with the correct columns. > > >     Posts table exist in database but there is no column for name,title > >     an

[Rails] Re: undefined method `posts_path'

2011-05-23 Thread John shelfer
On May 23, 11:33 am, Hassan Schroeder wrote: > On Mon, May 23, 2011 at 8:06 AM, john shelfer wrote: > >> Also check that the database does now actually contain the posts table > >> with the correct columns. > > >     Posts table exist in database but there is no column for name,title > >     an

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread Hassan Schroeder
On Mon, May 23, 2011 at 8:06 AM, john shelfer wrote: >> Also check that the database does now actually contain the posts table >> with the correct columns. > >     Posts table exist in database but there is no column for name,title >     and content even after "rake db:migrate",it couldn't genera

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread john shelfer
On Mon, May 23, 2011 at 10:50 AM, Colin Law wrote: > On 23 May 2011 15:37, john shelfer wrote: > > No.I followed yet it from Agile web development with Rails (Pdf).Does > > everything seems right with coding part? > > It looks ok. Can you post your models/post.rb file, model/post.rb

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread Colin Law
On 23 May 2011 15:37, john shelfer wrote: >   No.I followed yet it from Agile web development with Rails (Pdf).Does > everything seems right with coding part? It looks ok. Can you post your models/post.rb file, the error message you are getting, the stack trace, and the relevant section of code

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread john shelfer
On Mon, May 23, 2011 at 6:54 AM, Colin Law wrote: > On 23 May 2011 11:50, john shelfer wrote: > > > > > > On Mon, May 23, 2011 at 6:38 AM, Colin Law > wrote: > >> > >> On 23 May 2011 11:20, john shelfer wrote: > >> > > >> > > >> > On Mon, May 23, 2011 at 3:04 AM, Colin Law > >> > wrote: > >>

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread Colin Law
On 23 May 2011 11:50, john shelfer wrote: > > > On Mon, May 23, 2011 at 6:38 AM, Colin Law wrote: >> >> On 23 May 2011 11:20, john shelfer wrote: >> > >> > >> > On Mon, May 23, 2011 at 3:04 AM, Colin Law >> > wrote: >> >> >> >> On 23 May 2011 02:59, John shelfer wrote: >> >> > >> >> > >> >> >

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread john shelfer
On Mon, May 23, 2011 at 6:38 AM, Colin Law wrote: > On 23 May 2011 11:20, john shelfer wrote: > > > > > > On Mon, May 23, 2011 at 3:04 AM, Colin Law > wrote: > >> > >> On 23 May 2011 02:59, John shelfer wrote: > >> > > >> > > >> > On May 22, 12:57 pm, Jatin kumar wrote: > >> >> You are confus

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread Colin Law
On 23 May 2011 11:20, john shelfer wrote: > > > On Mon, May 23, 2011 at 3:04 AM, Colin Law wrote: >> >> On 23 May 2011 02:59, John shelfer wrote: >> > >> > >> > On May 22, 12:57 pm, Jatin kumar wrote: >> >> You are confusing things a lot. >> >> Answer this question first: >> >> Did you scaffold

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread john shelfer
On Mon, May 23, 2011 at 3:04 AM, Colin Law wrote: > On 23 May 2011 02:59, John shelfer wrote: > > > > > > On May 22, 12:57 pm, Jatin kumar wrote: > >> You are confusing things a lot. > >> Answer this question first: > >> Did you scaffold the model or you are adding the files one by one > writin

Re: [Rails] Re: undefined method `posts_path'

2011-05-23 Thread Colin Law
On 23 May 2011 02:59, John shelfer wrote: > > > On May 22, 12:57 pm, Jatin kumar wrote: >> You are confusing things a lot. >> Answer this question first: >> Did you scaffold the model or you are adding the files one by one writing >> the code by hand. >  I didnt scaffold.I am adding files one by

[Rails] Re: undefined method `posts_path'

2011-05-22 Thread John shelfer
On May 22, 12:57 pm, Jatin kumar wrote: > You are confusing things a lot. > Answer this question first: > Did you scaffold the model or you are adding the files one by one writing > the code by hand. I didnt scaffold.I am adding files one by one. > 1. If you did scaffold, I don't see a problem

Re: [Rails] Re: undefined method `posts_path'

2011-05-22 Thread Jatin kumar
You are confusing things a lot. Answer this question first: Did you scaffold the model or you are adding the files one by one writing the code by hand. 1. If you did scaffold, I don't see a problem coming anywhere. 2. If you didn't scaffold, then go for Colin's suggestion and read the guides, you

[Rails] Re: undefined method `posts_path'

2011-05-22 Thread John shelfer
On May 22, 3:15 am, Colin Law wrote: > On 22 May 2011 08:09, John shelfer wrote: > > > > > > > > > > > > > On May 22, 2:55 am, Colin Law wrote: > >> On 22 May 2011 07:41, John shelfer wrote: > >>> ... > >> > "undefined method `name' for # >> > updated_at: nil>" > > >> Look at the error and tr

Re: [Rails] Re: undefined method `posts_path'

2011-05-22 Thread Colin Law
On 22 May 2011 08:09, John shelfer wrote: > > > On May 22, 2:55 am, Colin Law wrote: >> On 22 May 2011 07:41, John shelfer wrote: >>> ... >> > "undefined method `name' for #> > updated_at: nil>" >> >> Look at the error and try and work out what it means.  There should >> also be an indication of

[Rails] Re: undefined method `posts_path'

2011-05-22 Thread John shelfer
On May 22, 2:55 am, Colin Law wrote: > On 22 May 2011 07:41, John shelfer wrote: > > > > > > > > > > > > > On May 21, 2:45 pm, Frederick Cheung > > wrote: > >> On May 21, 4:22 pm, John shelfer wrote: > > >> > On May 21, 5:13 am, Colin Law wrote: > > >> >    yes i added a resource and now rou

Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread Colin Law
On 22 May 2011 07:41, John shelfer wrote: > > > On May 21, 2:45 pm, Frederick Cheung > wrote: >> On May 21, 4:22 pm, John shelfer wrote: >> >> > On May 21, 5:13 am, Colin Law wrote: >> >> >    yes i added a resource and now router.rb look likes but same issue >> > is still there >> >> > Check::

[Rails] Re: undefined method `posts_path'

2011-05-21 Thread John shelfer
On May 21, 2:45 pm, Frederick Cheung wrote: > On May 21, 4:22 pm, John shelfer wrote: > > > On May 21, 5:13 am, Colin Law wrote: > > >    yes i added a resource and now router.rb look likes but same issue > > is still there > > > Check::Application.routes.draw do > >   get "posts/index" > >  r

[Rails] Re: undefined method `posts_path'

2011-05-21 Thread Frederick Cheung
On May 21, 4:22 pm, John shelfer wrote: > On May 21, 5:13 am, Colin Law wrote: > >    yes i added a resource and now router.rb look likes but same issue > is still there > > Check::Application.routes.draw do >   get "posts/index" >  resources :post resources should be plural, ie resources :po

[Rails] Re: undefined method `posts_path'

2011-05-21 Thread John shelfer
On May 21, 5:13 am, Colin Law wrote: > On 21 May 2011 10:00, john shelfer wrote: > > > > > > > > > > > > > On Sat, May 21, 2011 at 4:05 AM, Colin Law wrote: > > >> On 21 May 2011 05:18, John shelfer wrote: > > >> >> Please run rake routes and post that here > >> >  rake routes shows > >> >  p

Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread Colin Law
On 21 May 2011 10:00, john shelfer wrote: > > > On Sat, May 21, 2011 at 4:05 AM, Colin Law wrote: >> >> On 21 May 2011 05:18, John shelfer wrote: >> > >> >> Please run rake routes and post that here >> >  rake routes shows >> >  posts_index GET /posts/index(.:format) >> > {:action=>"index", :con

Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread john shelfer
On Sat, May 21, 2011 at 4:05 AM, Colin Law wrote: > On 21 May 2011 05:18, John shelfer wrote: > > > >> Please run rake routes and post that here > > rake routes shows > > posts_index GET /posts/index(.:format) > > {:action=>"index", :controller=>"posts"} > > > > What does your routes.rb look l

Re: [Rails] Re: undefined method `posts_path'

2011-05-21 Thread Colin Law
On 21 May 2011 05:18, John shelfer wrote: > >> Please run rake routes and post that here >  rake routes shows >  posts_index GET /posts/index(.:format) > {:action=>"index", :controller=>"posts"} > > What does your routes.rb look like? > router.rb file looks like: > > Check::Application.routes.draw

[Rails] Re: undefined method `posts_path'

2011-05-20 Thread John shelfer
> Please run rake routes and post that here rake routes shows posts_index GET /posts/index(.:format) {:action=>"index", :controller=>"posts"} What does your routes.rb look like? router.rb file looks like: Check::Application.routes.draw do get "posts/index" # The priority is based upon o