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
Comment Post #291876 If you know the ID: `FlagReason.find(id).destroy`
(more)
5 months ago
Comment Post #291876 Not that I know of. If it's only a few records that you don't need any more, I'd just use the Rails console to delete those specifically.
(more)
5 months ago
Edit Post #291876 Initial revision 5 months ago
Answer 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 doesn't care about what's already there - to the extent that if you don't have appropriate constrain...
(more)
5 months ago
Comment Post #291248 Need some more information to start to figure out what's going on. Step by step, what exactly are you doing, and what exactly happens? If you can include screenshots that would also help.
(more)
8 months ago
Comment Post #288654 @#63646 It'd be easy enough to export posts in Markdown form - it could be done with one SQL query, which you could then export into any format you like.
(more)
over 1 year ago
Comment Post #288654 I was going to add an answer, but this pretty much says everything I would have said anyway. SO hasn't built the ability to import from another source; we have limited SE import tools but I'm not sure they'd work for Teams.
(more)
over 1 year ago
Comment Post #287809 Doesn't sound like an issue with your caching setup, sounds like a bug to me. I'm not sure whether the string you're seeing is right or not - it looks vaguely like a Marshal string (Ruby's format for serializing native data), but I'm not sure whether it should be that or just a string.
(more)
almost 2 years ago
Edit Post #287739 Initial revision almost 2 years ago
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)
almost 2 years ago
Edit Post #287688 Initial revision almost 2 years 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)
almost 2 years ago
Edit Post #280452 Post edited:
Add deps
over 2 years ago
Edit Post #286528 Initial revision over 2 years 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)
over 2 years ago
Edit Post #285536 Initial revision almost 3 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)
almost 3 years ago
Comment Post #285521 Honestly, it sounds like there's something wrong with your setup somewhere - maybe a missed step, maybe some wrong configuration - difficult to tell exactly. You shouldn't get these errors at all. Did you seed the database when you set up initially? If you look in the database now, is there anything ...
(more)
almost 3 years ago
Edit Post #285515 Initial revision almost 3 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)
almost 3 years ago
Comment Post #285488 Really weird. I suspect it's because of the error log, which Cloudflare has mis-categorised before as an attempted attack. I thought we fixed that but maybe I need to have another look.
(more)
almost 3 years ago
Comment Post #285488 I can't find that ray ID in the logs, allowed or blocked. Do you have JS enabled?
(more)
almost 3 years ago
Edit Post #285484 Initial revision almost 3 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)
almost 3 years ago
Edit Post #285469 Initial revision almost 3 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)
almost 3 years ago
Edit Post #285467 Post edited:
Wrong answer!
almost 3 years ago
Edit Post #285468 Initial revision almost 3 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)
almost 3 years ago
Edit Post #285467 Initial revision almost 3 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)
almost 3 years ago
Edit Post #285208 Initial revision almost 3 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)
almost 3 years ago
Edit Post #283931 Initial revision about 3 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)
about 3 years ago
Comment Post #283881 @#54274 what's your question there? That's a success.
(more)
about 3 years ago
Edit Post #283881 Initial revision about 3 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)
about 3 years ago
Comment Post #283850 @#54274 Out of interest, how much sysadmin experience do you have? Setting this up on the public internet is certainly doable, but it does require some experience and ability to set up multiple components - you'll need DNS, preferably a reverse proxy like nginx or Apache, plus all the components of Q...
(more)
about 3 years ago
Edit Post #283850 Question closed about 3 years ago
Comment Post #283850 This sounds like a general server setup issue rather than something specific to Codidact. You may also be able to get help elsewhere on general sysadmin help sites or groups. Either way, we'll need more information to be able to help you with this - what exactly is the error message? What are you doi...
(more)
about 3 years ago
Comment Post #283848 You're missing dependencies, most likely. Run `sudo apt install libmysqlclient-dev` then try again.
(more)
about 3 years ago
Comment Post #283186 @#53922 doesn't need to contain anything specific, just any code to trigger any Co-Design JS functionality that you want to test.
(more)
over 3 years ago
Comment Post #283186 @#53922 like I said in this answer, `scratch.js` is an extra file I have in the `scratch` directory so I can test any JS stuff I want to. It's not already in the repo.
(more)
over 3 years ago
Edit Post #283186 Initial revision over 3 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 3 years ago
Edit Post #283068 Initial revision over 3 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)
over 3 years ago
Edit Post #282395 Initial revision over 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)
over 3 years ago