You may have heard before that Ruby isn't a concurrent language. In other words, it's not capable of doing two things at once. For the most part, you're right - the canonical version of Ruby that we use at Lumos (called MRI) locks the interpreter to a single thread of execution. This means you can never truly run a task "in the background" within the same process. MRI relaxes the lock however for certain IO operations, including file operations and network activity. The Ruby interpreter will "unlock" itself whenever it detects an IO operation, meaning other threads get to run. Pretty cool :)
Since Ruby does support at least some level of concurrency, it would be cool if we could use it in our apps. There are a couple of great Ruby concurrency libraries out there - namely Celluloid and concurrent-ruby. I'm going to talk about concurrent-ruby in this gist because it's the one I know best.