How to run a background task in rails


What sort of tasks do you intend to do?
Database/ file system/ operating system oriented, appropriate approach can be decided depending on these


The task is building source code with gcc.

take a look at the earlier mentioned backgrounDRb:

BackgrounDRb is a Ruby job server and scheduler. Its main intent is to
be used with Ruby on Rails applications for offloading long-running
tasks. Since a Rails application blocks while serving a request it is
best to move long-running tasks off into a background process that is
divorced from http request/response cycle.

I second on it