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

  • Home
  • SEARCH
  • 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 7973511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:07:33+00:00 2026-06-04T08:07:33+00:00

I really desperately need help with this issue and am more than a little

  • 0

I really desperately need help with this issue and am more than a little lost.

I am trying to deploy a new production server using Capistrano Ext to allow for a staging and production server but it fails to run the bundle install –deployment successfully.

The cap staging deploy works fine to an existing Ubuntu system but the new server is a constant fail as follows

my-app$ sh -c 'cd /var/www/html/rails/myapp/releases/20120519174459&& export PATH=/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/local/bin:/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin && bundle install --deployment'
  Fetching gem metadata from http://rubygems.org/......
  Fetching gem metadata from http://rubygems.org/..
  Installing rake (0.9.2.2) 
  Gem::LoadError: Could not find rubygems-bundler (>= 0) amongst []
  An error occured while installing rake (0.9.2.2), and Bundler cannot continue.
  Make sure that `gem install rake -v '0.9.2.2'` succeeds before bundling.

In any other directory the ruby -v and rails -v produce the expected results

my-home$ ruby -v
 ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

my-home$ rails -v
 Rails 3.2.2

A listing of the local Gems on the production servershows they are all available

my-home$ gem list

*** LOCAL GEMS ***

actionmailer (3.2.3, 3.2.2)
actionpack (3.2.3, 3.2.2)
active_utils (1.0.3)
activemerchant (1.21.0)
activemodel (3.2.3, 3.2.2)
activerecord (3.2.3, 3.2.2)
activeresource (3.2.3, 3.2.2)
activesupport (3.2.3, 3.2.2)
addressable (2.2.7)
ansi (1.4.2)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.0.1)
builder (3.0.0)
bundle (0.0.1)
bundler (1.1.3, 1.0.21)
cancan (1.6.7)
capistrano (2.12.0, 2.11.2)
capistrano-ext (1.2.1)
cocaine (0.2.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3, 1.2.0)
daemon_controller (1.0.0)
devise (2.0.4)
erubis (2.7.0)
execjs (1.3.2, 1.3.0)
faraday (0.7.6)
fastthread (1.0.7)
haml (3.1.4)
hashie (1.2.0)
highline (1.6.12, 1.6.11)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.3)
jquery-datatables-rails (1.9.1.3)
jquery-rails (2.0.2, 2.0.1)
jquery-ui-rails (0.3.0)
jruby-pageant (1.0.2)
json (1.7.3, 1.6.5)
libv8 (3.3.10.4 x86_64-linux)
mail (2.4.4)
metaclass (0.0.1)
mime-types (1.18, 1.17.2)
minitest (2.11.3)
mocha (0.10.5)
money (3.7.1)
multi_json (1.3.5, 1.1.0)
multipart-post (1.1.5)
mysql2 (0.3.11)
net-scp (1.0.4)
net-sftp (2.0.5)
net-ssh (2.4.0, 2.3.0)
net-ssh-gateway (1.1.0)
nifty-generators (0.4.6)
oauth (0.4.5)
oauth2 (0.5.2)
omniauth (1.0.3)
omniauth-facebook (1.2.0)
omniauth-google (1.0.1)
omniauth-linkedin (0.0.6)
omniauth-oauth (1.0.1)
omniauth-oauth2 (1.0.0)
omniauth-twitter (0.0.8)
orm_adapter (0.0.6)
paperclip (3.0.2)
passenger (3.0.12)
polyamorous (0.5.0)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3, 3.2.2)
railties (3.2.3, 3.2.2)
rake (0.9.2.2)
rdoc (3.12)
RedCloth (4.2.9)
rubygems-bundler (1.0.0)
rvm (1.11.3.3)
sass (3.1.18, 3.1.15)
sass-rails (3.2.5)
simple_form (2.0.1)
simple_oauth (0.1.5)
sprockets (2.1.3, 2.1.2)
sqlite3 (1.3.6)
squeel (1.0.1)
therubyracer (0.10.1, 0.9.10)
thor (0.14.6)
tilt (1.3.3)
timeliness (0.3.4)
treetop (1.4.10)
turn (0.9.4)
twitter (2.2.0)
tzinfo (0.3.33, 0.3.32)
uglifier (1.2.4, 1.2.3)
validates_timeliness (3.0.8)
warden (1.1.1)
will_paginate (3.0.3)

The rvm system wide on the server seems to be correct

my-home$ rvm list

  rvm rubies

  =* ruby-1.9.3-p194 [ x86_64 ]

  # => - current
  # =* - current && default
  #  * - default

 my-home$ rvm info

  RVM is not a function, selecting rubies with 'rvm use ...' will not work.
  You need to change your terminal settings to allow shell login.
  Please visit https://rvm.io/workflow/screen/ for example.

  ruby-1.9.3-p194:

    system:
      uname:       "Linux totg01 2.6.38-14-generic #58-Ubuntu SMP Tue Mar 27 20:04:55 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux"
      bash:        "/bin/bash => GNU bash, version 4.2.8(1)-release (x86_64-pc-linux-gnu)"
      zsh:         " => not installed"

    rvm:
      version:      "rvm 1.13.5 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
      updated:      "4 days 2 hours 5 minutes 13 seconds ago"

     ruby:
       interpreter:  "ruby"
       version:      "1.9.3p194"
       date:         "2012-04-20"
       platform:     "x86_64-linux"
       patchlevel:   "2012-04-20 revision 35410"
       full_version: "ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"

    homes:
      gem:          "/usr/local/rvm/gems/ruby-1.9.3-p194"
      ruby:         "/usr/local/rvm/rubies/ruby-1.9.3-p194"

    binaries:
      ruby:         "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby"
      irb:          "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/irb"
      gem:          "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/gem"
      rake:         "/usr/local/rvm/gems/ruby-1.9.3-p194/bin/rake"

    environment:
      PATH:         "/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
      GEM_HOME:     "/usr/local/rvm/gems/ruby-1.9.3-p194"
      GEM_PATH:     "/usr/local/rvm/gems/ruby-1.9.3-p194:/usr/local/rvm/gems/ruby-1.9.3-p194@global"
      MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-1.9.3-p194"
      IRBRC:        "/usr/local/rvm/rubies/ruby-1.9.3-p194/.irbrc"
      RUBYOPT:      ""
      gemset:       ""

But there is an epic fail in the application directory as there is nothing in ./vendor/bundle

app-dir$ ruby -v
 ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

app-dir$ rails -v
/usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find rake-0.9.2.2 in any of the sources (Bundler::GemNotFound)
  from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `map!'
  from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/spec_set.rb:83:in `materialize'
  from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/definition.rb:127:in `specs'
  from /usr/local/rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.3/lib/bundler/environment.rb:27:in `specs'
  from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.0/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
  from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.0/lib/rubygems-bundler/noexec.rb:59:in `setup'
  from /usr/local/rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.0/lib/rubygems-bundler/noexec.rb:74:in `<top (required)>'
  from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
  from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
  from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
  from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'

The system is Ubuntu 11.04 and ruby is installed using rvm system-wide with 1.93 as the default

The deploy.rb is as follows:

# This has been added due to multi deployment staging
set :stages, %w(staging production)
set :default_stage, "staging"

require 'capistrano/ext/multistage'

default_run_options[:pty] = true 

set :user, 'appuser'
set :application, "app"
set :keep_releases, 10

set :deploy_to, "/var/www/html/rails/#{application}"
set :repository,  "appuser@gitserver:/myapps/rails/#{application}.git"
set :deploy_via, :copy
set :ssh_options, {:forward_agent => true}
set :scm, :git 
set :branch, 'master'
set :scm_verbose, true
set :use_sudo, false

# This has been added due to multi deployment staging
# since :domain is defined in another file (staging.rb and production.rb),
# we need to delay its assignment until they're loaded
set(:domain) { "#{domain}" }
role(:web) { domain }
role(:app) { domain }
role(:db, :primary => true) { domain }

# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
  desc "cause Passenger to initiate a restart"
  task :restart do
    run "touch #{current_path}/tmp/restart.txt"
  end
  desc "reload the database with seed data"
  task :seed do
    run "cd #{current_path}; rake db:seed RAILS_ENV=production"
  end
end

before "deploy:assets:precompile", :bundle_install

after "deploy:update_code", :bundle_install
desc "install the necessary prerequisites"
task :bundle_install, :roles => :app do
  run "cd #{release_path}&& export PATH=/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/local/bin:/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin && bundle install --deployment"
  run "cp -Rf #{shared_path}/config/* #{release_path}/config/"
end

The other two staging and production files are ….

deploy/staging.rb

set :domain, "staging.myapp.com"
set :rails_env, "staging"
set :default_environment, {  
   'PATH' => "/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/opt/local/bin"  
}

deploy/production.rb

set :domain, "production.myapp.com"
set :rails_env, "production"
set :default_environment, {  
  'PATH' => "/usr/local/rvm/gems/ruby-1.9.3-p194/bin:/usr/local/rvm/gems/ruby-1.9.3-p194@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p194/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/mysql/bin"  
 }

So the fail is trying to bundle install –deployment in a newly delivered application directory. If bundle install –nodeployment is run it works fine!

What have I done wrong or not configured. I’ve spent 2 days trying to sort this out but it doen’t seem to make any sense why thios won’t work

  • 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-04T08:07:34+00:00Added an answer on June 4, 2026 at 8:07 am

    you had to miss the rvm instructions for capistrano: https://rvm.io/integration/capistrano/

    just read them, I will advise you to use the gem version which basically will allow you to select proper ruby:

    Installation:

    gem install rvm-capistrano
    

    Or add to Gemfile:

    gem 'rvm-capistrano'
    

    Example Capfile deploy.rb :

    set :rvm_type, :system    # :user is the default
    set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system
    
    require "rvm/capistrano"  # Load RVM's capistrano plugin.
    

    But better go check the docs, as more options are available: https://rvm.io/integration/capistrano/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I really need help here. I'm desperate at this point. I have NSOperation that
I have been trying desperately to fix this issue where my ListView items are
I'm really new in Android Development and, like many others, I'm trying desperately to
I really need help with Jekyll. I'm desesperately trying to generate pages where posts
I'm new to django, and desperately trying to figure out why I can't get
I'm really desperate on this one. I'm trying to make a Framework which you
I am really a XUL starter, i am desperately trying to write an application
im really desperate right now, ive tried everything. Everytime i run my app this
Really ripping my hair out on this one. I have a JAAS Authentication Provider
Really quick jQuery question... I have this function: $(document).ready(function() { $('a#show1').click(function() { $('.item1').toggle(1000); return

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.