chrisboulton / php-resque

PHP port of resque (Workers and Queueing)
MIT License
3.43k stars 759 forks source link

Class 'Resque_Job' not found #215

Open driesken opened 10 years ago

driesken commented 10 years ago

Hi,

I used to implement my queueing using php-resque-ex (a fork), but this project seemed a better fit due to some new functions. However, I seem to get this error when trying to enqueue a new job:

PHP Fatal error: Class 'Resque_Job' not found in /var/www/html/php-resque/lib/Resque.php on line 204

I've installed it correctly by doing a git clone and using composer to check the prequisites. The only thing that is in my script is:

require_once('../php-resque/lib/Resque.php'); Resque::enqueue($messagetype, 'ProcessMessage', $args);

danhunsaker commented 10 years ago

You need to load the Composer autoloader, too.

driesken commented 10 years ago

Thanks, did the trick!