Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you are using <a href="http://gembundler.com/" rel="nofollow">Bundler</a>, you may have to <a href="http://gembundler.com/man/bundle-exec.1.html" rel="nofollow">execute the script in the context of your bundle</a>. This will give your script awareness of the appropriate gems. It seems like even though your <code>gem env</code> gives you the correct gem path, your script may not be executing with the same environmental configuration.</p> <pre><code>run "cd #{current_path}; RAILS_ENV=production bundle exec script/delayed_job restart" </code></pre> <p>Or, if you're not using bundler, you might check the output of <code>gem env</code> from within the task to confirm that the script is or is not using the correct environment configuration. Try checking the logs for the output of this command.</p> <pre><code>run "cd #{current_path}; RAILS_ENV=production gem env" </code></pre> <p>My suspicion is that your <code>gem env</code> output will differ. You can also try listing the gems available to the task.</p> <pre><code>run "cd #{current_path}; RAILS_ENV=production gem list" </code></pre> <p>Lastly, you can examine the file <code>script/delayed_job</code> to see if it's pointing to a differing version of Ruby or Ruby on Rails config. Let us know if the these lines exist or look different:</p> <pre><code>#!/usr/bin/env ruby require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment')) </code></pre> <p><strong>Additional References</strong></p> <ul> <li><a href="http://docs.rubygems.org/read/chapter/9" rel="nofollow"><code>gem</code> command</a></li> <li><a href="http://docs.rubygems.org/read/chapter/9" rel="nofollow">http://docs.rubygems.org/read/chapter/9</a></li> </ul>
 

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