{"id":1064,"date":"2022-08-30T15:11:47","date_gmt":"2022-08-30T15:11:47","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/delayed-job-rails-3-undefined-method-up-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:11:47","modified_gmt":"2022-08-30T15:11:47","slug":"delayed-job-rails-3-undefined-method-up-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/delayed-job-rails-3-undefined-method-up-collection-of-common-programming-errors\/","title":{"rendered":"Delayed Job Rails 3 undefined method &#39;up&#39;-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to resurrect a project from a few months ago using Rails 3.0.7.<\/p>\n<p>I had delayed job working on it previously, but now Ive updated my gems I get the following error when I try and <code>enqueue<\/code> something.<\/p>\n<p><code>NoMethodError (undefined method<\/code>up&#8217; for :null:Symbol):`<\/p>\n<p>The line of code is:<\/p>\n<p><code>Delayed::Job.enqueue DelayedXlsExport.new(@email, timestamp, filename)<\/code><\/p>\n<p>DelayedXlsExport is:<\/p>\n<pre><code>class DelayedXlsExport &lt; Struct.new(:email, :timestamp, :filename)  \n  def perform\n    ....\n  end\nend\n<\/code><\/pre>\n<p>And here is part of the stack:<\/p>\n<blockquote>\n<p>activesupport (3.0.10) lib\/active_support\/callbacks.rb:415:in <code>_run_create_callbacks' activerecord (3.0.10) lib\/active_record\/callbacks.rb:277:in<\/code>create&#8217; activerecord (3.0.10) lib\/active_record\/persistence.rb:257:in <code>create_or_update' activerecord (3.0.10) lib\/active_record\/callbacks.rb:273:in<\/code>block in create_or_update&#8217; activesupport (3.0.10) lib\/active_support\/callbacks.rb:419:in <code>_run_save_callbacks' activerecord (3.0.10) lib\/active_record\/callbacks.rb:273:in<\/code> create_or_update&#8217; activerecord (3.0.10) lib\/active_record\/persistence.rb:40:in <code>save' activerecord (3.0.10) lib\/active_record\/validations.rb:43:in<\/code>save&#8217; activerecord (3.0.10) lib\/active_record\/attribute_methods\/dirty.rb:21:in <code>save' activerecord (3.0.10) lib\/active_record\/transactions.rb:240:in<\/code>block (2 levels) in save&#8217; activerecord (3.0.10) lib\/active_record\/transactions.rb:292:in <code>block in with_transaction_returning_status' activerecord (3.0.10) lib\/active_record\/connection_adapters\/abstract\/database_statements.rb:139:in<\/code> transaction&#8217; activerecord (3.0.10) lib\/active_record\/transactions.rb:207:in <code>transaction' activerecord (3.0.10) lib\/active_record\/transactions.rb:290:in<\/code> with_transaction_returning_status&#8217; activerecord (3.0.10) lib\/active_record\/transactions.rb:240:in <code>block in save' activerecord (3.0.10) lib\/active_record\/transactions.rb:251:in<\/code> rollback_active_record_state!&#8217; activerecord (3.0.10) lib\/active_record\/transactions.rb:239:in <code>save' activerecord (3.0.10) lib\/active_record\/base.rb:504:in<\/code>create&#8217; C:\/dev\/Ruby\/Ruby192\/lib\/ruby\/gems\/1.9.1\/bundler\/gems\/delayed_job-8efc2aa99e8b\/lib\/delayed\/backend\/base.rb:28:in `enqueue&#8217;<\/p>\n<\/blockquote>\n<p>My gem file:<\/p>\n<p><code>gem \"delayed_job\", :branch =&gt; 'v2.1', :git =&gt; 'git:\/\/github.com\/collectiveidea\/delayed_job.git'<\/code><\/p>\n<p>Any ideas here?<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:20:49. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to resurrect a project from a few months ago using Rails 3.0.7. I had delayed job working on it previously, but now Ive updated my gems I get the following error when I try and enqueue something. NoMethodError (undefined methodup&#8217; for :null:Symbol):` The line of code is: Delayed::Job.enqueue DelayedXlsExport.new(@email, timestamp, filename) DelayedXlsExport is: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1064","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1064","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1064"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1064\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1064"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1064"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1064"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}