Recently, a friend asked me why the sauerkraut he made didn't taste sour. He said he had followed a recipe I had given, which I knew worked because I'd made it many times. I asked him to take me step by step through the process: he rinsed the cabbage, sliced it thinly, added salt (which he mixed in thoroughly), then put the ingredients into a glass jar. He placed a water-filled plastic bag on top of the cabbage, so the ingredients would stay submerged in the brine created as the salt drew the water from the cabbage, then left it to ferment.
Except that it didn't.
I wondered if he was using too much salt (he wasn't), then eventually thought to ask him where he was putting the cabbage to ferment.
'In the fridge,' he replied. That explained it.
Making sauerkraut and other pickled vegetables is easy, as long as you follow a few rules. You need the right amount of salt - if there's too little, the vegetable will rot rather than ferment; if you have too much, the end product will be too salty (with kimchi, though, you can initially over-salt the cabbage because the vegetable is rinsed throughly before being mixed with seasonings, and yet more salt, then left to ferment). The salt sucks the moisture from the vegetable and then, through osmosis, the now salty water is drawn back. Pickling with vinegar works the same way.
After that, you need time and the right temperature. Time is variable - if it's warm, the pickles will ferment faster (although it can't be too warm). But if it's too cold, the vegetables won't ferment at all, which is what my friend found out when he put his sauerkraut into the fridge. The right temperature range for making pickles is about 15 to 20 degrees Celsius. If it's a little cooler or a little warmer, that's fine, they'll just take more or less time to ferment. But a refrigerator is - or should be - no warmer than five degrees, and at that temperature, fermentation slows or doesn't even begin.
Also, when pickling, the vegetables and implements used to mix and store them should be absolutely clean. Vegetables need to be rinsed well because they sometimes harbour microbes that will make the pickle spoil. Wash implements and canning jars in hot, soapy water, rinse them thoroughly, then sterilise them by filling them with boiling water. Leave them for a few minutes, then tip out the water and let the jars (and their lids) air dry. Although I don't seal the jars with the lids until after the vegetables ferment sufficiently (at which point I refrigerate them), I cover the mouth of the jar with a clean dish towel to prevent microbes from contaminating the pickles.