My folders have the following structure: root is /home3/username
My web app is under rails_apps/my_app/ so my views are under rails_apps/my_app/app/views
username@company.com [~]# ls -la rails_apps/my_app/app/views/
total 24
drwxr-xr-x 6 username username 4096 Sep 17 00:48 ./
drwxr-xr-x 8 username username 4096 Sep 13 23:13 ../
drwxr-xr-x 2 username username 4096 Sep 17 01:51 home/
drwxr-xr-x 2 username username 4096 Sep 15 08:47 layouts/
drwxr-xr-x 2 username username 4096 Sep 17 00:00 projects/
drwxr-xr-x 2 username username 4096 Sep 17 00:49 scenarios/
username@company.com [~]# ls -la rails_apps/my_app/app/views/home/
total 16
drwxr-xr-x 2 username username 4096 Sep 17 01:51 ./
drwxr-xr-x 6 username username 4096 Sep 17 00:48 ../
-rw-r--r-- 1 username username 311 Sep 17 00:14 index.html.erb
username@company.com [~]#
username@company.com [~]# cat rails_apps/my_app/app/views/home/index.html.erb
<center><h1>my_app</h1></center>
<html>
<head>
</head>
<body>
<form action = "/projects">
<br>
<input type="submit" value="Manage Projects" />
</form>
<form action = "/scenarios">
<br>
<input type="submit" value="Manage Scenarios" />
</form>
</body>
</html>
username@company.com [~]#
This is my rails_apps/my_app/config/routes.rb file
My_app::Application.routes.draw do
resources :scenarios
resources :projects do
collection do
get :update_fields
get :annual_production
end
end
get "home/index"
match ':controller(/:action(/:id(.:format)))'
root :to => 'home#index'
end
With this, my web application displays the content of file rails_apps/my_app/app/views/home/index.html.erb correctly, but when I click on the button "Manage Projects" it generates this error
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@my_app.company.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache Server at my_app.company.com Port 80
I believe this is a routing issue, because I have another web app that is very similar to this one, except that it is directly under root and this one is under rails_apps folder, but I don't seem to be able to fix it.
Can someone please help?