Answer the question
In order to leave comments, you need to log in
What is the correct way to find errors in Ruby on Rails?
Hi all!
I'm trying to learn Ruby on Rails here and I don't know how to properly look for errors.
If everything was simple in PHP (either the compiler displays an error, or you look at what the variables contain, what this or that function returns, etc.), but on RoR everything is not so clear.
Please tell me how you debug your code.
I installed Nginx and Thin, on which my RoR project is spinning
Answer the question
In order to leave comments, you need to log in
https://github.com/ConradIrwin/pry-rescue
https://github.com/charliesome/better_errors
You don't need Nginx for development. To see where your problem is, just read the logs, located in the application's log folder and named according to the environment in which the application is running.
Compiler in PHP???
Related :
guides.rubyonrails.org/debugging_rails_application...
Look at the logs that are in the log/production.log or log/thinXXXX.log folder of the project.
You can usually find the places where the errors were logged by the phrase "Completed 500".
Above this phrase there will be a backtrace of the error, starting with the name of the class of the error, which is so easily googled on stackoverflow :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question