Encountered difficult to understand problCompleted 500 Internal Server Error in 46ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.2ms)

AI-generated summary

whiteCows is experiencing a 500 Internal Server Error after updating Discourse code, specifically when liking a post. The error appears after updating the code and restarting the container, but only after changing the IP address used for access. Replacing the code with the original version resolves the issue, indicating the updated code is the culprit. The problem is perplexing because the code functioned correctly yesterday. whiteCows is a Java developer unfamiliar with Ruby and seeks assistance from Ruby experts. A second image (whiteCows) provides more detailed error logs, showing a 500 error with minimal ActiveRecord or GC time, suggesting the issue isn’ will be next in the posting logic.

Hello everyone, I am working on the integration reconstruction of discourse and encountered an unsolvable problem after updating the code. I hope to discuss it with everyone
This is the code block I updated

Then click the like button on the page, and a 500 error will pop up directly

Viewing backend container error

Using the same logic, the modified post bonus feature has no errors

What’s even more strange is that this code was still useful yesterday, but today I just updated the IP address for accessing it, and after restarting the container, this error appeared.
Replacing the source code without any modifications will result in no errors.
It’s really hard to understand.
The most important thing is that tomorrow or in a while, my posting logic may also reach 500
I am a Java developer and do not understand the language logic of Ruby. Do I need to update any more code?
I hope the experts can provide some assistance. Thank you here.

Completed 500 Internal Server Error in 46ms (ActiveRecord: 0.0ms (0 queries, 0 cached) | GC: 0.2ms)

That’s really strange


This is the detailed content