ga-wdi-boston / full-stack-project

Other
8 stars 64 forks source link

500 error: undefined local variable or method `user' #988

Closed 3point14guy closed 7 years ago

3point14guy commented 7 years ago

Trying to do a curl request to create an entry on my table and I get a 500 error:

{"status":500,"error":"Internal Server Error","exception":"#\u003cNameError: undefined local variable or method `user' for #\u003cClass:0x007f82048e1088\u003e\u003e",

Researching this error on Google it makes me think that the error is indicating that I need to define a user, but the table I am working with does not have a user column.

There were plenty of issues in the issue queue about 500 errors, but none that talked about a undefined local variable.

cpearce31 commented 7 years ago

Does it give you a line number for that error? Can you post the curl request and the controller code?

3point14guy commented 7 years ago

Turns out it did in terminal where the server was running. It pointed me right to the problem: now got 404. Will close this one and open a new one if I continue to have problems.

Thanks!