How to create thread at Rails startup?
问题 I'm trying to create a thread at Rails startup which will run throughout the lifetime of the app. The strange thing is, I already had this working with another thread I was running. I copied that (working) code and used it as boilerplate for the new code for the new thread. But the thread won't fire up. Code is in config/initializers (is this the correct place?). File is named starting with 'z_...' to insure it runs last. Rails 3.2.6 Here is the general structure of the code: class Blah def