Error 500 when accessing page Edit, ruby 1.9.2, Rails 3.2.13

Asked

Viewed 268 times

0

I have an application in Rails that just after loading the page Edit.html.haml rendering the layout returns me an error 500, the table in BD has only one record and is linked to the other table (credential/authorization system), I’m running the application in a bridge mode VM on linux Mint 17 Rebecca

Edit 1 follows the console output just after loading the roles:

Started GET "/clients/new" for 192.168.1.161 at 2015-03-12 18:28:23 -0300
Processing by ClientsController#new as HTML
User Load (0.2ms)  SELECT `users`.* FROM `users` WHERE `users`.`id` = 2   LIMIT 1
(0.1ms)  BEGIN
(0.2ms)  UPDATE `users` SET `last_request_at` = '2015-03-12 21:28:23',    `perishable_token` = 'zJ6WIgsox0VkSEzRwGlr', `updated_at` = '2015-03-12 21:28:23' WHERE `users`.`id` = 2
(1.4ms)  COMMIT
Role Load (0.1ms)  SELECT `roles`.* FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 2 AND `roles`.`name` = 'admin' LIMIT 1
Rendered clients/_form.html.haml (5.9ms)
Rendered clients/new.html.haml within layouts/application (7.0ms)
Completed 500 Internal Server Error in 18ms
  • Rendered clients/_form.html.haml (3.3ms) Rendered clients/new.html.haml Within layouts/application (3.8ms) Completed 500 Internal Server Error in 17ms

  • There’s nothing else on the console?

  • has some mysql queries to check user, but are exactly the same for any other page, and only appears when it asks for the "_form" (new.erb.html page also gives this problem).

  • Post your log on the question.

  • edited with the log

  • The console log is complete, so you can’t see the error.

  • exact! after mysql querys (which are a 4 for authentication checking) this is ALL that appears. I checked user tables and roles and roles_users but there is no missing record, no merge that does not exist...

Show 2 more comments

2 answers

1


sorry the disorder, in this specific case, due to some reason my debug screen was not working properly could not diagnose that, the problem was the route method "_path()", grateful for the attention of all.

0

It will not be possible to help you without knowing exactly what the error in the code is. It looks like you are running the server in production mode not to show the debug on the page.

I suggest running the server in dev mode and publishing the error you gave.

For this run: Rails server RAILS_ENV=Development

  • Yeah, but when I send him to display the ENV he returns "Velopment"

  • Entento. In that case paste the error that is giving so that we can know better...

  • error pasted in question

  • Hello Andre. No error message appears there. There is no way you can put a screen print with the name of the error? It should appear on the screen if you are running in development

  • it is, appears only the screen "we’re Sorry, but Something Went Wrong"

  • It is. As I had said you are running in production environment, so the error does not appear. You are running on your own machine...

  • Try running this command (you can copy and paste): Rails server RAILS_ENV=Velopment

  • I am not running in production environment because when I have printar the env it returns "Development".

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.