How to Create Temporary Files in Ruby

Creating a temporary file gives you an empty file with a random name inside your O.S. (Operating System) temporary folder. This file gets deleted automatically. How can you do this in Ruby? Like this: require ‘tempfile’ Tempfile.create { |f| f << “abc\n” } Where f is your file & << writes to it. This is … Read more

How to Use The Redis Database in Ruby

What is Redis? Redis is a kind of in-memory database that has different kinds of data structures you can use. Like: Key / value storage Lists Sets It has nothing to do with your typical SQL database, like Postgres. Uses for Redis include: Caching Leaderboards Counting visitors Fast autocomplete suggestions Keeping track of active user … Read more