# 404 error while testing the console

**URL:** <https://www.ruby-forum.com/t/404-error-while-testing-the-console/185959>\
**Category:** Rails\
**Created:** [March 29, 2010, 6:58pm UTC](https://www.ruby-forum.com/t/404-error-while-testing-the-console/185959 "2010-03-29T18:58:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 29, 2010, 6:58pm UTC](https://www.ruby-forum.com/t/404-error-while-testing-the-console/185959/1 "2010-03-29T18:58:21Z")

</div>

Hi,

I’m just practising ROR creating short applications.I tried to test the  
console for my sample application and get a different return code from  
the code its mentioned in the textbook…

here is the code

$script console  
Loading dev…

> > app.get “/slides”  
> > =\> 200
> 
> > app.request.path\_parameters  
> > =\>{action"=\>"index, “controller”=\>“slides”}
> 
> > app.get “/slides/1”  
> > 404

where I’m supposed to get 200 in the last line of above code.

Any help would be appreciated…

Raghu

---

<div class="post-metadata">

**Author:** ![raghu\_muni](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/85f322/32.png) [@raghu\_muni](https://www.ruby-forum.com/u/raghu_muni)\
**Post date:** [March 30, 2010, 10:19am UTC](https://www.ruby-forum.com/t/404-error-while-testing-the-console/185959/2 "2010-03-30T10:19:43Z")

</div>

> where I’m supposed to get 200 in the last line of above code.

It would be more normal that the second url would be “/slide/1”. If  
that  
doesn’t fix it post your routes.rb file.

RESTful routes are /slides (as you want a list of all the SLIDES  
available)  
and /slide/:id if you want a SLIDE in particular.

Cheers,

Andy
