Reputation: 6415
I'm reluctant to ask this but I can't figure it out. When I run the following command in heroku console
I get a syntax error. Why?
QUEUE='*' rake jobs:work
Error:
SyntaxError: compile error
/home/heroku_rack/lib/console.rb:150: syntax error, unexpected tIDENTIFIER, expecting $end
QUEUE='*' rake jobs:work
^
/home/heroku_rack/lib/console.rb:150
/home/heroku_rack/lib/console.rb:150:in `call'
/home/heroku_rack/lib/console.rb:28:in `call'
/usr/ruby1.8.7/lib/ruby/1.8/monitor.rb:242:in `synchronize'
My resque.rake file includes the alias task "jobs:work" => "resque:work"
and the command was copied verbatim from the console's history so I know it's been run before.
Upvotes: 0
Views: 345
Reputation: 37507
If you're using anything but the Cedar stack then you're limited to using DelayedJob on Heroku.
http://devcenter.heroku.com/articles/delayed-job
http://devcenter.heroku.com/articles/queueing#background_jobs_on_herokubamboo
Upvotes: 0
Reputation: 17790
The Heroku console is a Rails console, it's not a bash shell.
You're trying to execute QUEUE='*' rake jobs:work
as if it were a valid Ruby command, which of course it isn't.
Are you perhaps trying to do this? (scroll down to "run anything" where it talks about Resque).
Upvotes: 1