Skip to content

Instantly share code, notes, and snippets.

@Trilarion
Trilarion / gist:759cd28877179b28f9a387d400d47294
Created January 6, 2022 19:45
Question post on collab.codidact.org that is blocked by cloudfare
title of question: How to fix 500 Server Error "NoMethodError: undefined method `id' for nil:NilClass"?
tags: support, installation
body content:
Following the [set up guide](https://collab.codidact.org/posts/280451/280452#answer-280452) I was able to start rails server and got my very first QPixel page served (see screenshot):
![Screenshot of the 500 Server Error](https://collab.codidact.org/uploads/nTMMK32Yu5C8JtMYJYxaUbEN)
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)`.
@Trilarion
Trilarion / sort_osgameclones_yamls.py
Last active June 29, 2022 05:16
Sorting YAMLS from osgameclones automatically
"""
Sorts game entries for osgameclones automatically. Put in osgameclones root folder and execute. Tested with Python 2/3.
Sorts the entries in the yaml files in the games folder. Sorts by name (lower case, "the" and "a" is ignored).
Can also move entries from one yaml file to another.
ruamel.yaml is used, because it doesn't change the order of the keys in the dictionaries (install with pip install ruamel.yaml)
(see also https://stackoverflow.com/questions/5121931/in-python-how-can-you-load-yaml-mappings-as-ordereddicts)
License: CC0 (do whatever you want)