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

Dashboard
Notifications
Mark all as read
Q&A

Can not create a new post on fresh installation Question

+2
−0

I'm running qpixel on my local and followed instruction on README. After signed up and try to create a new post it's return error :

ActiveRecord::NotNullViolation: Mysql2::Error: Field 'tag_set_id' doesn't have a default value: INSERT INTO tags (name, created_at, updated_at, community_id) VALUES ('test', '2021-01-21 00:49:53', '2021-01-21 00:49:53', 2)

/ruby/qpixel/app/models/post.rb:142:in block in update_tag_associations' /ruby/qpixel/app/models/post.rb:141:in each' /ruby/qpixel/app/models/post.rb:141:in update_tag_associations' /ruby/qpixel/app/controllers/posts_controller.rb:91:in create'

I go to http://localhost:3000/categories/3/tags and got error too:

NoMethodError: undefined method `tags' for nil:NilClass

/ruby/qpixel/app/controllers/tags_controller.rb:30:in category

I installed on Mac OS Big Sur.

How to fix it?

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

1 comment

I don't know the details (I'm not a developer), but I've heard something about needing to seed the tag sets. Does that mean anything to you? (Hoping someone with more of a clue answers properly...) Monica Cellio‭ 5 months ago

1 answer

+2
−0

You've missed a step: you need to make sure each category is associated with a tag set. There's a full setup guide here that you can follow. For the easy fix, from each category's page, click Edit Category near the top, and fill in "Tag set" under the "Posting" section.

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

3 comments

Thanks, it's worked, my bad, I just focused on command instruction not on CMS/site instruction. But btw I think it's better to have default tag set on default category from seeder. Or at least any notice to set it first. Yaskur‭ 5 months ago

and also on your link don't have instruction to set tag set. Yaskur‭ 5 months ago

Yup that is right, @Yaskur. The link does in fact provide something even better: a setup script doing this automatically for you. Just run /admin/setup on the site to seed the tags and set the tag sets. luap42 😷‭ 5 months ago

Sign up to answer this question »

This community is part of the Codidact network. We have other communities too — take a look!

You can also join us in chat!

Want to advertise this community? Use our templates!