Undefined Method Error when creating delayed_job workers with script/delay_job
It looks like the problem was derived from bundler >= 1.0.10 loading up psych and overwriting some of sycks functionality if libyaml is present. I was able to remove the libyaml install from my system, something that I know won't be possible for everyone. Tough to track down, hopefully this post will help someone else
Delayed_job: Undefined method error on any call
I was Googling the same issue, and I found a fix for this(it worked for me).
add these two lines to the head of your config/application.rb
require 'yaml'
YAML::ENGINE.yamler = 'syck'
then, restart your server(webrick/thin/whatever) and delayed_job
(bundle exec ./script/delayed_job restart)
done.
undefined method error when running delayed_jobs in multiple queues with ./script/delayed_job -n
well, try
bundle exec ./script/delayed_job -n 2 start
;)
Delayed Job giving a undefined method error
I have managed to fix this.
I created a setup_load_paths.rb a few weeks ago when bundler stopped working for some reason. This meant that the gemfile was being loaded everywhere, except by passenger. This messed up the call to YAML::ENGINE.yamler = "syck" which seems to be what mucked up the saving of the object.
I removed the setup_load_paths and everything is working nicely now.
Delayed Job failing in Production environment on Server
I figured it out. It was due to package "libyaml" package, which was not present on my local system but was installed on server.
Delayed_job: undefined method `handle_asynchronously' for #Class:0x4601b08
I had a model called DelayedJob
in my models directory. I added this model to query the job queue. This conflicted with the delayed_job.rb
file. I renamed the file and the problem went away.
Rails 4 Delayed_job error - Job failed to load: undefined class/module CustomJob
I always feel like the answer is obvious...AFTER I figure it out.
The problem was that I was using a shared database and there were existing workers accessing this DB. Though I was restarting and refreshing my local instance of the server, the other instances were trying to run my jobs and the OTHER workers were causing the error, not my local instance.
Solution: Ensure that other instances of delayed_job are using the same table as the code you're testing/building/using. If so, use another DB if possible.
Related Topics
Using Poltergeist with a Proxy
Delayed_Job: Job Failed to Load: Uninitialized Constant Syck::Syck
Adding Fields to Devise Sign Up Using Rails 4
Confused with Ruby Accessor Methods
How to Link to a Page with Page.Url Without the HTML Extension in Jekyll
Ruby: Wait for All Threads Completed Using Join and Threadswait.All_Waits - What the Difference
Validating Phone Number in Ruby
How to Emit Yaml in Ruby Expanding Aliases
Need Advice: Structure of Rails Views for Submenus
How to Pass Value from One Resource to Another Resource in Chef Recipe
How to Download File from Google Drive API with Service Account
Rails: Chartkick Cummulative User Graph
Why Is Autoload Failing to Load Files for Gems
What Is an Eoferror in Ruby File I/O
Ruby Range: Operators in Case Statement