Agile Web Development with Rails 3rd Edition - ruby-on-rails

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.

Related

Rails annoying message We're sorry, but something went wrong

****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.

This website is under heavy load, rails app

I am getting error, I tried searching a lot. And seen many posts but nothing worked for me. Any suggestions on how to fix this.
This website is under heavy load
We're sorry, too many people are accessing this website at the same time. We're working on this problem. Please try again later.
when I run free -m, this is the memory status
and seeing nginx configuration file, these are my settings
I tried modifying settings, according to different things specified by people on stackoverflow. But I still facing the issue
The Passenger documentation and the following article explain what this error is, why you get it, and how you can make it go away:
https://www.phusionpassenger.com/library/config/nginx/reference/#passenger_max_request_queue_size
What is optimal value for Phusion passenger PassengerMaxRequestQueueSize

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.

Ruby on Rails Tutorial Complete Files

I've got lost somewhere along the way with this tutorial (the one at ruby.railstutorial.org), and have an error in my code somewhere. Does anyone have the complete files for the completed application so that I can compare a working version to mine? Thanks!!
you can find the files here on github

Passenger "No such file to load" error for Model

I'm having a problem with deploying a Rails 3 app to a Passenger/Apache2/RVM server running Ubuntu 11.10.
I'm getting the error:
A source file that the application requires, is missing.
...
Error message: No such file to load -- Goal
Exception class: LoadError
Goal is one of my Rails Models.
I've seen a lot of people with a similar error message, but their issues seem to relate to missing bundles/gems - not model files! Their problems were resolved by ensuring permissions were set up correctly, so to that end I've got:
Apache running as www-data, as is Passenger. RVM is installed as www-data and I've chown'd the entire web app directory to www-data.
I've been wrestling with this for some time now and am really out of ideas - if anyone has any suggestions I'd be very grateful!
You might probably have the file structure of your Rails app wrong. Are you sure you have the "goal.rb" file within {your_app_root_url}/app/models/ ?
To me, if I am seeing the error when you view the app in browser, it seems like your rails app and passenger(with apache2) are working fine. The other possibility is you might be looking at wrong app folder which passenger is set up to.
It's hard to tell what's wrong. Please provide more details of how you set up your passenger with your rails app directory. Also it would help if you could show what's inside your app (app structure) and what's inside goal.rb model file.
Well I've solved it. Turned out that a work around for a problem with yaml encoded model archives (i.e. an explicit require of Goal) in a completely unrelated Model was causing the error to appear. Looks like it only rears its head in production - probably due to the differences between the class loaders used in development vs. production.
Tough one to find... the stack trace didn't include a reference to where the problem actually was!

Resources