简体   繁体   中英

How do I troubleshoot errors in Ruby on Rails?

I am trying to get a Rails app working on my web host. Using CPanel, I can create a rails app and I can access the index.html (Welcome aboard) page from my browser. But when I click on "About your application's environment", it says "We're sorry, but something went wrong."

I don't have access to any files on the webserver outside of my home directory. The logs directory under my apps root has a mongrel.log file, and development/production/server/test.log files in it. I can see the mongrel.log has some info written to it when I start the app server, but none of the other files ever get written to.

I'm not sure if this is an issue with my code, or with the web host, so I don't know whether I should submit a support ticket or not.

Any idea what is wrong or what I need to do to troubleshoot the problem?

Since you are just testing the app currently and to get more debug information try to run the app in development mode and make sure that you have config.action_controller.consider_all_requests_local = true in your environments/development.rb file.

Though I can guess that you might be getting this error because you haven't created your database according your config/database.yml file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM