Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

#3: Post edited by user avatar Trilarion‭ · 2022-01-09T11:42:13Z (almost 3 years ago)
  • How to fix 500 Server Error "NoMethodError: undefined method `id' for nil:NilClass"?
  • How to fix NoMethodError: undefined method `id' for nil:NilClass when visiting the QPixel homepage?
#2: Post edited by user avatar Trilarion‭ · 2022-01-08T14:19:33Z (almost 3 years ago)
  • Following the [set up guide](https://collab.codidact.org/posts/280451/280452#answer-280452) I was able to start rails server and got my very first QPixel page served (see screenshot):
  • ![Screenshot of the 500 Server Error](https://collab.codidact.org/uploads/nTMMK32Yu5C8JtMYJYxaUbEN)
  • Unfortunately it was a `500 Server Error`, which I did not expect and which wasn't mentioned in the guide. Attached is part of the console output which speaks of a `NoMethodError (undefined method `id' for nil:NilClass)`.
  • ```
  • Started GET "/" for 127.0.0.1 at 2022-01-06 09:55:55 +0100
  • [...]
  • NoMethodError (undefined method `id' for nil:NilClass):
  • [...]
  • Completed 500 Internal Server Error in 360ms (Views: 204.1ms | ActiveRecord: 26.5ms)
  • ```
  • Is this intended behavior or a bug (and if so how to fix it)?
  • I tried to continue with the guide and signed up a user, but that didn't change anything about the error. It seems like the dev community is not set up correctly.
  • In trying to reach this point I repeated steps of the manual several times (and encountered other errors), so maybe I compromised the state of the installation somewhere. I will repeat the guide on a clean system again to be sure. Nevertheless this question should remain as something that might happen to others as well.
  • Following the [set up guide](https://collab.codidact.org/posts/280451/280452#answer-280452) I was able to start rails server and got my very first QPixel page served (see screenshot):
  • ![Screenshot of the 500 Server Error](https://collab.codidact.org/uploads/nTMMK32Yu5C8JtMYJYxaUbEN)
  • Unfortunately it was a `500 Server Error`, which I did not expect and which wasn't mentioned in the guide. Attached is part of the console output which speaks of a `NoMethodError (undefined method `id' for nil:NilClass)`. It's incomplete because of a [cloudflare block](https://collab.codidact.org/posts/285488), more of it is [here](https://gist.github.com/Trilarion/759cd28877179b28f9a387d400d47294).
  • ```
  • Started GET "/" for 127.0.0.1 at 2022-01-06 09:55:55 +0100
  • [...]
  • NoMethodError (undefined method `id' for nil:NilClass):
  • [...]
  • Completed 500 Internal Server Error in 360ms (Views: 204.1ms | ActiveRecord: 26.5ms)
  • ```
  • Is this intended behavior or a bug (and if so how to fix it)?
  • I tried to continue with the guide and signed up a user, but that didn't change anything about the error. It seems like the dev community is not set up correctly.
  • In trying to reach this point I repeated steps of the manual several times (and encountered other errors), so maybe I compromised the state of the installation somewhere. I will repeat the guide on a clean system again to be sure. Nevertheless this question should remain as something that might happen to others as well.
#1: Initial revision by user avatar Trilarion‭ · 2022-01-08T14:17:51Z (almost 3 years ago)
How to fix 500 Server Error "NoMethodError: undefined method `id' for nil:NilClass"?
Following the [set up guide](https://collab.codidact.org/posts/280451/280452#answer-280452) I was able to start rails server and got my very first QPixel page served (see screenshot):

![Screenshot of the 500 Server Error](https://collab.codidact.org/uploads/nTMMK32Yu5C8JtMYJYxaUbEN)

Unfortunately it was a `500 Server Error`, which I did not expect and which wasn't mentioned in the guide. Attached is part of the console output which speaks of a `NoMethodError (undefined method `id' for nil:NilClass)`.

```
Started GET "/" for 127.0.0.1 at 2022-01-06 09:55:55 +0100
[...]
NoMethodError (undefined method `id' for nil:NilClass):
[...]
Completed 500 Internal Server Error in 360ms (Views: 204.1ms | ActiveRecord: 26.5ms)
```

Is this intended behavior or a bug (and if so how to fix it)?

I tried to continue with the guide and signed up a user, but that didn't change anything about the error. It seems like the dev community is not set up correctly.

In trying to reach this point I repeated steps of the manual several times (and encountered other errors), so maybe I compromised the state of the installation somewhere. I will repeat the guide on a clean system again to be sure. Nevertheless this question should remain as something that might happen to others as well.