Forum: Ruby on Rails Routing Error Recognition failed for "/..."

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
40325a74d3c41a71bc6bd91da685d952?d=identicon&s=25 Brad W (Guest)
on 2007-01-11 04:18
This isn't a question but more of an FYI for any newbies as stupid as me
that can't figure out why they get a similar message like this when
typing the application's name into the URL thinking that it's the same
as the directory name.

For example, my app was called moviecritic, so I tried navigating to
http:localhost:3000/moviecritic after booting up WeBrick, but received
this error. Then, I tried my model name, movie, instead of moviecritic
and it worked.
4dfa3542d9933c6fc887dbcea5853a75?d=identicon&s=25 Brad W (Guest)
on 2007-01-11 04:21
Brad W wrote:
> This isn't a question but more of an FYI for any newbies as stupid as me
> that can't figure out why they get a similar message like this when
> typing the application's name into the URL thinking that it's the same
> as the directory name.
>
> For example, my app was called moviecritic, so I tried navigating to
> http:localhost:3000/moviecritic after booting up WeBrick, but received
> this error. Then, I tried my model name, movie, instead of moviecritic
> and it worked.

Oops, that's incorrect. It wasnt the same as my model name, which was
Movie, but the same as the table name in my DB.
1fba4539b6cafe2e60a2916fa184fc2f?d=identicon&s=25 unknown (Guest)
on 2007-01-11 04:57
(Received via mailing list)
Hi --

On Thu, 11 Jan 2007, Brad W wrote:

>> and it worked.
>
> Oops, that's incorrect. It wasnt the same as my model name, which was
> Movie, but the same as the table name in my DB.

I'll bet you have a controller file called movies_controller.rb :-)
When you connect to the application, the routing mechanism zeros in on
a particular controller action, based on the URL (with some
interpretation thereof by the route recognizer).  If you connect to
/movies, then by default that will look for the "index" action in the
"movies" controller (i.e., movies_controller.rb).

Even if the table name is the same, it's not involved at this stage.


David

--
Q. What is THE Ruby book for Rails developers?
A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black)
    (See what readers are saying!  http://www.rubypal.com/r4rrevs.pdf)
Q. Where can I get Ruby/Rails on-site training, consulting, coaching?
A. Ruby Power and Light, LLC (http://www.rubypal.com)
This topic is locked and can not be replied to.