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 8765893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:24:17+00:00 2026-06-13T16:24:17+00:00

$ bundle exec cap -S branch=master production deploy –dry-run /Users/myname/.rvm/lib/rvm/capistrano.rb:5: RVM – Capistrano integration

  • 0
$ bundle exec cap -S branch=master production deploy --dry-run
/Users/myname/.rvm/lib/rvm/capistrano.rb:5: RVM - Capistrano integration was extracted to a separate gem, install: `gem install rvm-capistrano` and remove the `$LOAD_PATH.unshift` line, note also the 'set :rvm_type, :user' is now the default (instead of :system). (RuntimeError)

That’s what I get. Not sure what’s going on. Thoughts?

EDIT my deploy.rb

# RVM is used for ruby 1.9.2 - this is so cap can see the rvm gemset.
$LOAD_PATH.unshift "lib", File.expand_path('./lib', ENV['rvm_path'])

set :stages, %w(sandbox qa production)
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
require 'airbrake/capistrano'
require 'chef/capistrano'
require 'secure_files/capistrano'
require "rvm/capistrano"

set :rvm_ruby_string, '1.9.2'
set :rvm_bin_path, '/usr/local/rvm/bin'
set :user, "root"
set :scm, :git
set :repository,  "git@github.com:Myact/fbadapter.git"
set :deploy_to, '/var/www/fbadapter'
set :deploy_via, :remote_cache
set :rails_env, Proc.new {stage}
set :application, 'fbadapter'
set :default_environment, Proc.new { { 'RAILS_ENV' => stage } }
set :rake, "bundle exec rake --trace"
set :foreman_bin, 'bundle exec foreman'
set :rake, "#{foreman_bin} run rake"  
set :rails, "#{foreman_bin} run rails"
set :app_user, 'www-data'

set :bundle_without,  [:development, :test, :ops, :darwin]

# this must be set before foreman/capistrano is read
set :foreman_roles, [:app]
require "foreman/capistrano"

after 'multistage:ensure' do
 role_from_chef :db, 'app', :limit => 1, :primary => true # perform db operations on one of the app servers
 role_from_chef :web, 'app'
 role_from_chef :app
 role_from_chef :queue
 role_from_chef :cron
end


before 'deploy:symlink', 'deploy:assets:precompile', 'deploy:migrate'
after 'deploy:symlink', :set_application_permissions

after 'deploy', 'deploy:cleanup', 'campfire:deploy_stop'
after 'rollback', 'campfire:deploy_rollback'

desc 'Changes the permissions for the release path to be used with www-data'
task :set_application_permissions do
  run "chown -R #{app_user}:#{app_user} #{release_path}/*"
end

# These services are monitored by monit, but interacting with them that way
# is hugging-every-cat crazy. This means we're assuming two thin procs per
# app server; if that changes then remember to change this too.

namespace :deploy do
  task :stdout_logger do 
    run "cd #{release_path} && #{rails} plugin install https://github.com/ddollar/rails_log_stdout.git"
  end

  before 'deploy:symlink', 'deploy:stdout_logger'
end
  • 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-13T16:24:18+00:00Added an answer on June 13, 2026 at 4:24 pm

    Here is what I have in mine. These are the only lines I have to use the rvm-capistrano gem. I do the deploys as a non-sudo user too if that helps.

    set :rvm_ruby_string, '<interpreter>@<gemset>'
    
    # Load RVM's capistrano plugin.
    require "rvm/capistrano"
    set :rvm_path, "$HOME/.rvm"
    

    Since you’re running bundle exec, make sure rvm and rvm-capistrano gems are in your Gemfile. Also change the rvm_ruby_string below as suits your needs.

    I’m fairly sure you need to remove this line too

    LOAD_PATH.unshift "lib", File.expand_path('./lib', ENV['rvm_path'])
    

    I also noticed you are using the “root” user to do the deploy. Fairly sure that’s not going to work unless the rvm is installed for the root user. If you must use the root user I’d use an rvm wrapper if possible.

    RVM Wrappers

    Good luck!

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

Sidebar

Related Questions

I'm getting this error when trying to do : bundle exec cap deploy RVM
When I run RAILS_ENV=production bundle exec rake assets:precompile I get: Rake aborted! no such
I run: $ bundle exec rspec spec/ And receive this message: C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.1/lib/rspec/core.rb:78:in `require': no
I keep getting an issue with rspec when I bundle exec rake spec /Users/sean/.rvm/gems/ruby-1.9.2-p0@hub/gems/rspec-core-2.4.0/lib/rspec/core/option_parser.rb:18:in
When I run my clockwork I get this error: C:\Rails\konkurranceportalen>bundle exec clockwork lib/clock.rb Starting
When I run bundle exec rake assets:precompile --trace , my precompilation fails but I
I have that sneaking feeling I'm missing something obvious: I ran RAILS_ENV=production bundle exec
When I run bundle exec rake jasmine then browse to http://localhost:8888/ I see the
I get this error while running bundle exec /usr/lib/ruby/gems/1.8/gems/bundler-1.0.20/lib/bundler/cli.rb:344:in `exec': wrong number of arguments
I use bundle exec autotest to run my test specs as I work however

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.