Rails annoying message We're sorry, but something went wrong - ruby-on-rails

****We're sorry, but something went wrong.
If you are the application owner check the logs for more information.****
On various rails applications I have been getting this all the time. How can this be fixed for good on ruby on rails apps?

You will have to check the log and fix the error, for production application you can use services like airbreak or errbit a free solution. Whenever this page occurs you will receive full trace and error. Hope this will help you in making application much more stable.

Related

EOFError (end of file reached)

I am not really sure what is going on with my rails app. I have not changed any code on my front page but I am getting the error EOFError (end of file reached) with no further information on the logs.
It is only the index page that has this issue. I would like to know, if there is any other way I can get more information on this error.
This is all I have from papertrail
Edit: In localhost everything works fine but once I have deployed to Heroku my frontpage does not work.
After a back and forth with Heroku, my issue ended up being resolved. There was no error in the code as this piece of code had been working all along. Heroku advised that maintenance occurs every night and maybe the moving of the app to a different dyno might have resolved the issue.
If anyone else ends up with a similar issue, if a restart does not fix it maybe ask Heroku to move you to a different dyno.

how to debug web server on RoR?

I currently have a problem with a project.
it freezes before it shows the "Started GET ...." seems like it hits an infinite loop.
now i dont really have much experience with debuggers in ROR, can anyone recommend anything i can use to trace the exact origin of the problem. if i can get an error code somewhere then i might be able to fix it.
currently i am using webrick, i tried thin and it gave the exact same error.but i am willing to use anything to find the exact origin of this error.
it seems to be related to the project because all other projects works fine on my environment.
Take a look at the Rails guide on debugging.
Also try running the Rails console ("rails c"); if you can get to a command prompt at all that means that the issue is not in loading the Rails environment (e.g. a problem in application.rb) but is somewhere in the process of making a web request. If there's a failure it may give you a better error message.

Logging stacktraces when running a Rails app on Thin

This is probably something stupid as I have never deployed a Rails app before. However:
I developed the app using WEBrick. When I got an exception, I'd get a helpful stacktrace in the console. Now I am deploying the app to Thin, running as a Windows service (I am not using Windows by choice, I hasten to add).
When the app gets an exception running in Thin, all I get in the logs is: Completed 500 Internal Server Error in 31ms. No stacktrace or description of the error. When I run it in Thin in the console I get a description of the error, but no class name or line number. I'm sure it's some simple config but a bit of googling has turned up nothing so far. Can anyone shed any light on how to get more informative error logging?
On a related note, what's the simplest and best way to set up email notifications on error in a Rails app?
Ignore me - I was being stupid. I created some extra environments for the app (a sales and a uat environment) and foolishly copied config/environments/test.rb which has
config.action_dispatch.show_exceptions = false
and I now feel quite foolish.
what's the simplest and best way to set up email notifications on error in a Rails app?
The exception_notification gem.

Phusion passenger code being cached?

I was adding some updates to my rails application, as well as upgrading from 3.0.4 to 3.1.1. I then ran into some errors. I was using the request.request_uri method, which threw an error. Once i corrected it locally, i pushed up my code. However even after restarting, the same error is being thrown. I can see my code is corrected on the server. Is there some sort of application caching i should check? Or anything else?
Looks like a stupid error on my part. Had an app folder sitting under app. So it was picking up the other helper file with the bad code, not the one i had updated. Happy i fixed it at least.

Agile Web Development with Rails 3rd Edition

it is showing me following error when i m opening http://localhost:3000/store
**We're sorry, but something went wrong.
We've been notified about this issue
and we'll take a look at it shortly.**
do anyone knows why it is showing me that error?
Look at the development.log file inside your log directory, it should give you a better clue.

Resources