I have setup a ROR environment on my server and once i generate a
controller with a few actions in it and put a basic message in each
action within the controller rb file also editing the views for these
actions all i get is the standard 404 not found. I can not understand
why this is.
p.s all the routes are pointing to the controller and actions i created
as well
I am using REE too if thats helps, as when starting webrick i get can’t
connect to mysql so its bit more than the other one, like i said
REE and apache 2.
I have setup a ROR environment on my server and once i generate a
controller with a few actions in it and put a basic message in each
action within the controller rb file also editing the views for these
actions all i get is the standard 404 not found. I can not understand
why this is.
Any ideas
Have you edited your routes.rb file to reflect this new controller? The
default since quite a while now has been for there to not be a
“catch-all” route that would attempt to handle anything that didn’t have
an explicit declaration. You may need to add a line like this:
resources :modelname
if you have all of the basic 7 REST routes covered, or another route
that more explicitly lays out the controller methods you want to expose.
I am use REE too if thats helps, as when starting webrick i get can’t
connect to mysql so its bit more than the other with is on like i said
REE and apache 2.
Post the full error message. We are not telepathic. At least I am
not. Copy and paste it, do not retype it.
Also are you able to access the database from mysql command line or GUI?
Also tell us which operating system you are using and which version of
Rails.
OK problem has been fixed by setting RailsEnv to development and it
works, but setting it to production message comes back so it looks like
passenger run it default in production mode so i don’t know why this is.
Oh ok, so are there other option need to be set for the production env
to stop the “We’re sorry, but something went wrong.” message
“We’re sorry, but something went wrong.” message says there’s something
wrong in your code/setup. You have to check your log in log/ directory
(either production/development.log)
how comes it works in the development as its the same app?
Look in production.log and you may find out. There is no way anyone
here can know the answer. There are innumerable possibilities from
forgetting to create the production database to subtle page caching
problems.