Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9241939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:28:27+00:00 2026-06-18T08:28:27+00:00

I’m having problems deploying the Whenever gem to my production environment using Capistrano. The

  • 0

I’m having problems deploying the Whenever gem to my production environment using Capistrano.

The problem is stemming from a bundle exec whenever command that’s triggering some ‘missing gem’ issues (yet running bundle install from the shell shows that everything is in fact there!).

My feeling is that one of two things is happening: that Bundler isn’t fully loading before bundle exec is being called, or that somehow there’s a path issue that’s running it in the wrong place.

Here’s what’s going on:

  * executing `deploy'
  * executing `deploy:update'
 ** transaction: start
  * executing `deploy:update_code'
    executing locally: "git ls-remote git@my-source-repository:mysource.git HEAD"
    command finished in 1847ms
  * executing "git clone -q git@my-source-repository:mysource.git /domains/myapp/releases/20130124211036 && cd /domains/myapp/releases/20130124211036 && git checkout -q -b deploy 90238bbcb993e3e7df2374ffaa13e7ed701c202e && (echo 90238bbcb993e3e7df2374ffaa13e7ed701c202e > /domains/myapp/releases/20130124211036/REVISION)"
    servers: ["myip"]
    [myip] executing command
 ** [myip :: out] Enter passphrase for key '/home/deploy/.ssh/id_rsa':
 ** [myip :: out]
    command finished in 9294ms
  * executing `deploy:finalize_update'
    triggering before callbacks for `deploy:finalize_update'
  * executing `whenever:update_crontab'
  * executing "cd /domains/myapp/releases/20130124211036 && bundle exec whenever --update-crontab My App --set environment=production --roles db"
    servers: ["myip"]
    [myip] executing command
 ** [out :: myip] Could not find carrierwave-0.5.8 in any of the sources
 ** [out :: myip] Run `bundle install` to install missing gems.
    command finished in 1967ms
*** [deploy:update_code] rolling back
  * executing "rm -rf /domains/myapp/releases/20130124211036; true"
    servers: ["myip"]
    [myip] executing command
    command finished in 998ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell '1.9.3' -c 'cd /domains/myapp/releases/20130124211036 && bundle exec whenever --update-crontab My App --set environment=production --roles db'" on myip

You can see that the failure is coming from this line:

bundle exec whenever --update-crontab

Which is in turn being run by my Capistrano deploy.rb.

# Your Application's "Name"
set :application, [My App]

# The URL to your application's repository
set :repository, [repo]
set :scm, :git
set :scm_passphrase, [password]

# The user you are using to deploy with (This user should have SSH access to your server)
set :user, "deploy"

# We want to deploy everything under your user, and we don't want to use sudo
set :use_sudo, false

# Where to deploy your application to.
set :deploy_to, "/domains/myapp/"

# Load RVM's capistrano plugin.    
require "rvm/capistrano"

set :rvm_ruby_string, '1.9.3'
set :rvm_type, :system  # use system-wide RVM

# Require that we use bundler to install necessary gem dependencies
require "bundler/capistrano"

set :whenever_command, "bundle exec whenever"
require "whenever/capistrano"


# -------------------------------- Server Definitions --------------------------------
# Define the hostname of your server.  If you have multiple servers for multiple purposes, we can define those below as well.
set :server_name, [server]

# We're assuming you're using a single server for your site, but if you have a seperate asset server or database server, you can specify that here.
role :app, server_name
role :web, server_name
role :db,  server_name, :primary => true

# -------------------------------- Final Config --------------------------------
# This configuration option is helpful when using svn+ssh but doesn't hurt anything to leave it enabled always.
default_run_options[:pty] = true 

namespace :deploy do
  desc "Tell Passenger to restart the app."
  task :restart do
    run "touch #{deploy_to}current/tmp/restart.txt"
  end

  task :start do
    run "cd #{deploy_to} && ln -s current/public public_html"
    run "touch #{deploy_to}current/tmp/restart.txt"
  end

  task :symlink do
    run "cd #{deploy_to} && rm current ; ln -s releases/#{release_name} current"
  end

  task :stop do
    run "rm #{deploy_to}public_html"
  end

  namespace :web do
    task :disable do
      run "cd #{deploy_to} && rm public_html && ln -s static_site public_html"
    end

    task :enable do
      run "cd #{deploy_to} && rm public_html && ln -s current/public public_html"
    end
  end


  desc "Symlink shared configs and folders on each release."
  task :symlink_shared do
    run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
    run "ln -nfs #{shared_path}/assets #{release_path}/public/assets"

    # create symlink to uploads folder for Carrierwave resources (i.e., book cover images)
    run "ln -nfs #{shared_path}/uploads  #{release_path}/public/uploads"
  end

  desc "Sync the public/assets directory."
  task :assets do
    system "rsync -vr --exclude='.DS_Store' public/assets #{user}@#{application}:#{shared_path}/"
  end

end

after "deploy", "deploy:migrate"

after 'deploy:update_code', 'deploy:symlink_shared'

after(:setup) do
  run "rm -rf #{deploy_to}public_html"
  run "mkdir #{deploy_to}static_site"
end

Now, the error that I’m getting about CarrierWave is bogus – I’ve been using CarrierWave for ages – and the issue clearly stems (as you can see by the command that triggers the error) from either Whenever itself or Bundler.

And I’m thinking that it actually may have something to do with paths related to RVM. At any rate, the bundle exec whenever isn’t working.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T08:28:28+00:00Added an answer on June 18, 2026 at 8:28 am

    It turns out there were a couple problems, both of which needed addressing:

    • Whenever ~> 0.8 introduced a bug with Capistrano roles
    • The Whenever cap task was firing before bundle:install (this is confirmed in your code above)

    See issues here: https://github.com/javan/whenever/issues/275 and here: https://github.com/javan/whenever/issues/269

    To fix the problem, you most likely need to

    • Update bundler on your server (-v 1.2.3)
    • Update bundler locally
    • Update to the newest Whenever (-v 0.8.2)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
We're building an app, our first using Rails 3, and we're having to build
I am currently running into a problem where an element is coming back from
I am using jsonparser to parse data and images obtained from json response. When
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.