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 »

Posts by ArtOfCode‭

19 posts
75%
+4 −0
Q&A How to test CoDesign?

I have a test page on my local dev environment so that I can test things. If you look at .gitignore, you'll find there's an ignore in there for scratch/* already. Create a directory called scratch...

posted 4y ago by ArtOfCode‭

Answer
75%
+4 −0
Q&A How to show border using classes while there's another border attribute in css? Should I use style attribute that moment?

You should almost never use a style attribute. They're clunky, they mix HTML with CSS meaning you can't preload it, and they override just about everything else. Instead, either use atomic classes...

posted 4y ago by ArtOfCode‭

Answer
71%
+3 −0
Q&A Can not create a new post on fresh installation

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 ...

posted 4y ago by ArtOfCode‭

Answer
71%
+3 −0
Q&A What user-facing things aren't covered well by automated tests (and should be tested manually)?

The really core features (posting, voting, commenting, editing) are pretty thoroughly tested; we only really need to test those exhaustively by hand if we're making significant changes to them - ot...

posted 4y ago by ArtOfCode‭  ·  edited 2y ago by Trilarion‭

Answer
71%
+3 −0
Q&A How does a newcomer to Ruby get oriented in the qpixel code?

This is assuming that you're new to Ruby and Rails (and the MVC design pattern that comes with it), but you have programming experience. First, some orientation: Ruby is the programming language...

posted 3y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A How do I force db:seed to forget previous context and load only what is in the flags YAML file?

This is the difference between refreshing the database and seeding the database. db:seed does what it says on the tin - seeds the database. That means it adds pre-defined data to the database. It ...

posted 1y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A What's a low-effort option for a Codidact development machine?

A Raspberry Pi will run QPixel, and would be almost ideal for development as a small tinkering box. It's small, it'll fit on a desk with everything else already there, it can be remoted into. The o...

posted 4y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A mysql return error `ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop table 'abilities' referenced by a foreign key constraint 'fk_rails_de15a6ad96' on table 'user_abilities'.: DROP TABLE IF EXISTS abilities`

You've already got a database there that you're trying to overwrite. As long as it hasn't got anything in it that you want, do a drop database qpixel_dev and drop database qpixel_test, then re-run ...

posted 4y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A How to solve Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

As the error message says, you can re-run the installation for that single gem to get more detail about the error: gem install mysql2 Read the log and any error messages carefully, as they will...

posted 4y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A Desired state of code documentation

QPixel has limited code documentation. That's partially by design, and partially because it often just gets missed out. Ruby is a relatively verbose language which tries to be as self-documenting ...

posted 3y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A How to set up a Production environment

Assuming you've followed the steps in the guide to setting up development, changing that to a production environment is relatively easy. Check your production configuration file (config/environm...

posted 2y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A How to solve ActionView::Template::Error: Database missing time zone support for Etc/UTC in ReportsControllerTest

Your MySQL installation is missing timezone support for the groupdate gem that we use. Run the following: mysql_tzinfo_to_sql /usr/share/zoneinfo | sudo mysql -u root mysql and you should be g...

posted 3y ago by ArtOfCode‭  ·  edited 3y ago by Trilarion‭

Answer
66%
+2 −0
Q&A How to fix NoMethodError: undefined method `id' for nil:NilClass when visiting the QPixel homepage?

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 s...

posted 3y ago by ArtOfCode‭

Answer
66%
+2 −0
Q&A How to fix ActionView::Template::Error (No route matches {:action=>"new", :controller=>"posts", :post_type=>nil} when visiting the moderator page?

This is related to your other problem - it's the same root cause. Without any post types in the database, there aren't any to add to the categories, and the help and policy post types don't exist t...

posted 3y ago by ArtOfCode‭

Answer
60%
+1 −0
Q&A How to solve Magick::ImageMagickError: no decode delegate for this image format in AdvertisementControllerTest#test_image_paths_should_return_png

I have this error in my local environment too, and I've not been able to figure it out yet. It's somehow related to ImageMagick being built (or not) with the right image libraries, but as far as I ...

posted 3y ago by ArtOfCode‭  ·  edited 3y ago by ArtOfCode‭

Answer
60%
+1 −0
Q&A Checking if the user is signed in from front end code

When you say front-end code, do you mean views or JavaScript? The answer is different. Views are the client-side code, but are generated server-side so you have access to things like user_signed_i...

posted 2y ago by ArtOfCode‭

Answer
60%
+1 −0
Q&A How to deal with OpenSSL::Cipher::CipherError when editing QPixel's credentials

The error is actually a ActiveSupport::MessageEncryptor::InvalidMessage, which means either the message you're trying to decrypt is corrupted (it isn't), or you have the wrong key. Since the creden...

posted 3y ago by ArtOfCode‭

Answer
60%
+1 −0
Q&A How to circumvent Stripe::AuthenticationError: No API key provided

Stripe setup is handled in config/initializers/stripe.rb, where the Stripe API key is set based on the values saved in the Rails credentials file. You should be able to run rails credentials:edit ...

posted 3y ago by ArtOfCode‭

Answer
Q&A How do I write a new test case?

We have some limited automated testing already, particularly around core features. This guide covers how to create new tests. Who can write tests? Anyone who's comfortable with a little bit of re...

posted 4y ago by ArtOfCode‭  ·  edited 4y ago by ArtOfCode‭

Wiki guide tests new-contributors code-contributions