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

How to fix NoMethodError: undefined method `id' for nil:NilClass when visiting the QPixel homepage? Question

+1
−0

Following the set up guide I was able to start rails server and got my very first QPixel page served (see screenshot):

Screenshot of the 500 Server Error

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, more of it is here.

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.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

0 comment threads

1 answer

+2
−0

You don't have a homepage category set. Go to the category list (/categories), pick one to be the homepage, edit it and tick the homepage option, then save it and try again.

If that's not in the setup guide, it probably should be!

History
Why does this post require moderator attention?
You might want to add some details to your flag.

1 comment thread

Works, but maybe Community.create should simply add a test category with it (1 comment)

Sign up to answer this question »