Note that there are some explanatory texts on larger screens.

plurals
  1. PODelayedJob: "Job failed to load: uninitialized constant Syck::Syck"
    primarykey
    data
    text
    <p>I am using Ruby on Rails 3.1 and the DelayedJob gem. I have a Contact Us form through which people can contact me. When I submit that I get the following error</p> <pre><code>`last_error` = '{Job failed to load: uninitialized constant Syck::Syck. Handler: \"--- !ruby/struct:Delayed::PerformableMailer ... </code></pre> <p>However, I have also others forms that send e-mails (eg: Sign Up and Sign In users) and those work as expected. The only problem seems to occur with the Contact Us form.</p> <p>I read others related problem posts but I still cannot make that to work... <strong>how can I solve the problem?</strong></p> <p>P.S.: It seems that before upgrading to Rails 3.1 it worked.</p> <hr> <p><strong>UPDATE</strong> for <em>@Shaun</em></p> <p>Now my 'boot.rb' file is</p> <pre><code>require 'rubygems' require 'yaml' YAML::ENGINE.yamler= 'syck' # Set up gems listed in the Gemfile. gemfile = File.expand_path('../../Gemfile', __FILE__) begin ENV['BUNDLE_GEMFILE'] = gemfile require 'bundler' Bundler.setup rescue Bundler::GemNotFound =&gt; e STDERR.puts e.message STDERR.puts "Try running `bundle install`." exit! end if File.exist?(gemfile) </code></pre> <p>After requiring <code>yaml</code> I get this error (note: <code>Syck::Syck::BadAlias</code> is "a new"\"different from the previous" error):</p> <pre><code>{Job failed to load: uninitialized constant Syck::Syck::BadAlias. Handler: \"--- !ruby/struct:Delayed::PerformableMailer ... </code></pre> <p>My 'database.yml' file is:</p> <pre><code>development: adapter: mysql2 encoding: utf8 reconnect: false database: app_name_development pool: 5 username: root password: socket: /tmp/mysql.sock test: adapter: mysql2 encoding: utf8 reconnect: false database: app_name_test pool: 5 username: root password: socket: /tmp/mysql.sock production: adapter: mysql2 encoding: utf8 reconnect: false database: app_name_production pool: 5 username: root password: ******* socket: /var/run/mysqld/mysqld.sock </code></pre> <hr> <p><strong>UPDATE</strong> for <em>@KensoDev</em></p> <p>My 'Gemfile' file is:</p> <pre><code>source 'http://rubygems.org' gem 'rails', '3.1.0' gem 'rake' gem 'mysql2' gem 'paperclip', '~&gt; 2.3' gem 'will_paginate', '~&gt; 3.0.pre2' gem 'delayed_job' gem 'memcache-client', '1.8.5' group :assets do gem 'sass-rails', '~&gt; 3.1.0' gem 'coffee-rails', '~&gt; 3.1.0' gem 'uglifier' end gem 'jquery-rails' gem 'capistrano' gem "rdoc", "~&gt; 3.6.1" group :test do # Pretty printed test output gem 'turn', :require =&gt; false end </code></pre> <hr> <p><strong>ADDITIONAL INFORMATION</strong></p> <p>At this time, in order to call the delivering method, I use the following code:</p> <pre><code>::Pages::Mailer.delay.contact_us(@user) # It doesn't work and doesn't send the e-mail </code></pre> <p>On the other hand, if I use the following code:</p> <pre><code># Note: It doesn't have the '::' at the beginning Pages::Mailer.delay.contact_us(@user) # It doesn't work and raise the 'NameError' (described below) </code></pre> <p>I get this error:</p> <pre><code>NameError (uninitialized constant ActionController::Caching::Pages::Mailer) </code></pre> <p>The same happens if I use the "not delayed" version:</p> <pre><code>::Pages::Mailer.contact_us(@user).deliver # It works and SENDS THE E-MAIL!!! Pages::Mailer.contact_us(@user).deliver # It doesn't work and raise the 'NameError' </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload