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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:18:12+00:00 2026-05-30T00:18:12+00:00

I have a Ruby on Rails 3.2 app using bundler and capistrano for deployment.

  • 0

I have a Ruby on Rails 3.2 app using bundler and capistrano for deployment. My server is a Debian Squeeze with rvm and ruby 1.9.2. I read the rvm stuff for capistrano (http://beginrescueend.com/integration/capistrano/) where you can set the gemset by set :rvm_ruby_string, '1.9.2@my_gemset'.

But during the deployment, bundler writes every gem to /var/www/my_app/shared/bundle. I thought if i define the rvm_ruby_string with the @ sign, bundler would use the gemset.

The output from the deployment says

  * executing "cd /var/www/my_app/releases/20120216145728 && bundle install --gemfile /var/www/my_app/releases/20120216145728/Gemfile --path /var/www/my_app/shared/bundle --deployment --quiet --without development test"

Where I can change the --path /var/www/... to use the 1.9.2@my_gemset gemset from rvm?

Maybe its, because I’m using several environments for deployment (staging, production…). So here is my deploy.rb

# RVM bootstrap
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
require 'capistrano/ext/multistage'
require 'bundler/capistrano'
require 'rvm/capistrano'

set :rvm_bin_path, "/usr/local/rvm/bin"
set :rvm_type, :system

set :stages, %w(production staging)
set :default_stage, "staging"

set :application, "my_app"
set :repository,  "gitosis@mydomain.org:my_app.git"

set :scm, :git

set :user, "my_deploy_user"

set :use_sudo, false

set :ssh_options, { :forward_agent => true }

default_run_options[:pty] = true

namespace :deploy do
  task :start do
  end
  task :stop do
  end
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
  end
end

And in config/deploy/staging.rb

set :rails_env, "staging"
set :rvm_ruby_string, '1.9.2@my_gemset'
set :deploy_to, "/var/www/my_app"

role :web, "stage.mydomain.de"                          # Your HTTP server, Apache/etc
role :app, "stage.mydomain.de"                          # This may be the same as your `Web` server
role :db,  "stage.mydomain.de", :primary => true # This is where Rails migrations will run

Maybe someone can help me.

  • 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-05-30T00:18:13+00:00Added an answer on May 30, 2026 at 12:18 am

    You’re both using bundler and rvm integration. Rvm will make sure it is using the right ruby (convenient for managing rubies), bundler will separate all gems into the shared/bundle directory. This is bundlers default setting for production. I believe that this is a good way to set this up, also because it works with passenger out of the box, separates gems from each app, and has rvm handling the rubies.

    If you really want to use RVM for gem separation, you can best start at this blogpost by Darcy (this applies for passenger). As you can see, there is some effort involved in making that work, but it is possible.

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

Sidebar

Related Questions

I have a ruby on rails app running a server and sometimes it needs
I have a Ruby on Rails app running on my server, and I can't
I have a Rails 3rc app on Ruby 1.9.2 that works fine, but Bundler
My Ruby on Rails app is using LivePipe Modals. ( http://livepipe.net/ ) Everything has
I have a Ruby on Rails app that I've recently deployed to a remote
I have a Ruby script in my Rails app that I use to load
In my Ruby on Rails app, I have a User table and a Foo
I have a Ruby on Rails Website that makes HTTP calls to an external
I have an app based on Rails 3 (version Rails 3.1.2 ) and ruby
I have a jruby/rails app using: jruby 1.4.0 Rails 2.3.5 ActiveMQ 5.3.0 Mule ESB

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.