jstorimer/delayed_paperclip — pull request #48 by tommeier (2011-11-09 04:18:50+00:00)
Title: Bug on edge when delayed_job is not installed

I was gettting errors when the app was trying to load, when the gem was loaded it failed with :

```Bash
14:23:56 web.1 | /Users/tom/.rvm/gems/ruby-1.9.2-p290-patched@newco/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': no such file to load -- delayed_job (LoadError)
```

I've patched the require statement to autoload the files only in the case that they get used. So if delayed_job is installed, but not resque, then only the delayed_job file is loaded (with the require 'delayed_job' requirement). And vice versa.

As was my case. Our gemset only had resque, no delayed_job.

I tried setting up a few tests for this scenario, but it didn't seem worth it, when it would need removal from the gemspec as development dependencies, and specs run with one, two and both. Not worth it.

(the commit i can't seem to remove was just the bundler reordering of version numbers to be smaller-> larger)