routes and controller question


I uploaded my application to the web server and every thing is working
fine besides the admin area I created. The directory's structure is
that all the pages that are controlled by an admin are inside "admin"
directory. The admin controller basically just looks after the login
and authentication.
It has a method to check for login and redirects the user to the admin
directory and in it to the product controller.

redirect_back_or_default(:controller => '/admin/product')

but what happens is that the login occurs fine but I get a 404 error,
which I don't get on my local machine, because it works fine on my

My routes.rb has the following lines:

map.connect ':controller/:action/:id.:format'
map.connect ':controller/:action/:id'

My rails version is 1.2.3 but I'm not sure of the rails version on the
server (I'm using rails playground hosting).

Maybe the problem is that the routes don't correctly map so Rails
thinks I want to load {:controller => "admin", :action => "product"}
even though I really want {:controller => "admin/product", :action =>

Would anyone have asuggestion on how I could fix this?


Still get a 404 error. Same with any other pages I try to access that
in the admin directory.


restart the production server… then it will work

Probably a silly question but still: on my computer I use ctrl+c to
restart mongrel. On the web server, I will need to login using SSH and
then what?


Wouldn't that kill the first running process, which I guess would be
the web server? but then, do I need to start it?


Yes, Apache.
When I run the first command I get:
2202 ? 00:00:04 ruby
2219 ? 00:00:02 ruby
22014 ? 00:00:02 ruby
22807 ? 00:00:07 ruby
23139 ? 00:00:05 ruby

so, my next command should be kill 2202??


I get this:
-jailshell kill 2202 Operation not permitted


I wanted to ask again in regards to my original problem: where all my
admin pages are in the "admin" directory but the application thinks I
am trying to access admin controller action product instead of going
to the product controller inside the admin directory.

Because it works on my machine but not on the web server, I tried to
freeze gems and uploaded the rails directory that was created in the
vendor one.

I also still have problem with restarting the server. The support team
said to run the following commands:
ps aux | grep username
to see what processes belong to my user and then
killall -9 dispatch.fcgi
but again I get "Operation not permitted"

So, I'm still not sure why it works on my computer and not on the
server. And I still not sure how to fix it.
Would someone please have an idea of what my problem is?


What do you think, should I just eliminate the admin directory so all
the controllers are in the same directory?