Hello Guys,
Do you stuck with the problem to execute rake jobs:work during delayed_job implementation? than follow the below steps.
Rake.rb
In your rails application's Rakefile add few lines.
begin
gem 'delayed_job', '~>2.0.5'
require 'delayed/tasks'
gem 'delayed_job', '~>2.0.5'
require 'delayed/tasks'
rescue LoadError
STDERR.puts "rake gems:install` to install delayed_job"
end
STDERR.puts "rake gems:install` to install delayed_job"
end
Also if you want to use the script/delayed_job start command than add delayed_job under lib folder of rails application.
lib/delayed_job
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '.', 'config', 'environment'))
require 'delayed/command'
Delayed::Command.new(ARGV).daemonize
Now, you do the rake -T to see that delayed_job task are also embed. Hope you will find useful support via this post.
No comments:
Post a Comment