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 »

Activity for ArtOfCode‭

Type On... Excerpt Status Date
Answer 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/environments/production.rb`) and make sure that it works for you. I can't tell you what's right here - it dep...
(more)
over 1 year ago
Answer 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 `usersignedin?` and `currentuser`. JavaScript has the QPixel JS API that you can use: ```js const user = awa...
(more)
over 1 year ago
Answer 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 that QPixel is written in. It's object-oriented, interpreted, and quite like Python in some ways &mda...
(more)
almost 2 years ago
Answer 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 to make this link work.
(more)
over 2 years ago
Answer 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 setup guide, it probably should be!
(more)
over 2 years ago
Answer 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 `credentials.yml.enc` in the repo is the production credentials, the key for this is stored separately. F...
(more)
over 2 years ago
Answer 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: ``` mysqltzinfotosql /usr/share/zoneinfo | sudo mysql -u root mysql ``` and you should be good to go.
(more)
over 2 years ago
Answer 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` (set the EDITOR environment variable to whatever command line editor you use first), and set `stri...
(more)
over 2 years ago
Answer 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 can tell my environment has all the right libraries already... As a workaround, you can just skip run...
(more)
over 2 years ago
Answer 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 as possible by design and by convention. Rails continues that pattern. A lot of Ruby and Rails code ca...
(more)
over 2 years ago
Answer 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 from Co-Design, or if that doesn't work add a class of your own and write some custom CSS. In th...
(more)
over 2 years ago
Answer 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 contain information about what's wrong. As I mentioned in a comment, you will need vario...
(more)
over 2 years ago
Answer 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`, add an `index.html` in there something like this: ```html Test Page ...
(more)
over 2 years ago
Answer 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 qpixeldev` and `drop database qpixeltest`, then re-run from the start.
(more)
almost 3 years ago
Answer 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 only catch is that (unless you buy a pre-set-up Pi) you do have to set up the OS, but that's not a diffic...
(more)
almost 3 years ago
Answer 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 Category near the top, and fill in "Tag set" under the "Posting" section.
(more)
over 3 years ago
Answer 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 relatively simple code. What do I need? You need at least: the repository cloned to your local ma...
(more)
over 3 years ago
Answer 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 - otherwise it's a reasonable assumption that if the tests passed then they're working. It's as we get ou...
(more)
over 3 years ago