Controller namespace problem?

I’m not getting any love grouping controllers into separate namespaces
and I’m hoping someone can tell me what I’m not getting:

$ rails foo
$ cd foo
$ script/generate controller Namespace::Bar index
$ script/server

$ lynx http://localhost:3000/namespace/bar
-> 404
-> Routing Error
-> Recognition failed for “/namespace/bar”

Many thanks in advance.

Hello Erik,

-> 404
-> Routing Error
-> Recognition failed for “/namespace/bar”

Can you show us what does your config/routes.rb look
like ?

– Jean-François.

Jean-François wrote:

Hello Erik,

-> 404
-> Routing Error
-> Recognition failed for “/namespace/bar”

Can you show us what does your config/routes.rb look
like ?

– Jean-François.

It’s stock as generated in the example. I have changed my routes.rb to
specify the namespace and that works, I just thought it was free. I
added this above the default route:

map.connect ‘namespace/bar/:action/:id’ :controller => ‘namespace/bar’

and it works. Thanks.

Can you show us what does your config/routes.rb look
like ?

That would definitely help, but I had something similar so you can give
this
a try.

In config/routes.rb:

map.connect ‘:controller/:action’
map.connect ‘:controller/:action/:id’