Rails Application error

Hi,

My application is giving error "Application error (Apache)

Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html".

Although am not using Apache as a web server but it is installed on my
system. I am using WebRick Server. All other applications are running,
but when i am trying to run a particular application this error is
coming.

Any help would be greatly appreciated.

Ruchita S. wrote:

Any help would be greatly appreciated.

Can you give us a bit more info?

Are you running the app using the command line:

ruby script/server

If so does it give you an error there?

Ruchita S. wrote:

Hi,

My application is giving error "Application error (Apache)
Although am not using Apache as a web server but it is installed on my
system. I am using WebRick Server. All other applications are running,

try shutting down the apache server. if it is giving u an Apache error
just shut the thing down. you don’t need an apache server in the
background to see u’r app. maybe it is overriding some of the defaults
webrick thinks it has and … crash .

worth checking out.
htw

I have stopped the apache server and tried it again. It is giving the
same error.

Luke P. wrote:

Ruchita S. wrote:

Any help would be greatly appreciated.

Can you give us a bit more info?

Are you running the app using the command line:

ruby script/server

If so does it give you an error there?

yes… am using the app using the command line:

ruby script/server. Server is starting properly, it is not giving any
error.
When i am typing "http://localhost:3000/login " on browser then its
giving error.

“Application error”

Can you check if the server is intialized properly by opening the
url : “http://localhost:3000” i.e. without your controller, if it
works fine, most probably you need there’s some problem with your
controller class.

~Shishir

On Sep 26, 2:03 pm, Luke P. [email protected]

Hi,

I had tried to open the url : “http://localhost:3000” , it is giving the
same error. Now what should i do?

–Ruchita

You’d usually only get that if you are somehow running in production
mode or if something is seriously wrong with your development
environment and it can’t start up properly.

Few things you could try:

  1. Ensure you are running in development mode:

ruby script/server -edevelopment

Just to make sure you are running in development mode.

  1. Can you return a model from the console? (i.e.
    ExistingModel.find(:all)

ruby script/console

This will confirm that you can connect to the database okay.

  1. Check your log files for any errors & make sure they are writable

  2. At a last resort I’d try to create a dummy controller or strip some
    code from an existing one so all your doing is returning a static page
    and gradually add it back in until it falls over.

Cheers
Luke

I am not sure, what’s wrong with your webrick server, but I would
suggest you to try switching to mongrel and see if it works fine. I am
assuming your ruby installation is fine and without any issues.

you can run ‘gem install mongrel’ and then select the appropriate
version to install the same…

hope this works…

~shishir

On Sep 26, 2:54 pm, Ruchita S. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs