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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:56:39+00:00 2026-05-25T15:56:39+00:00

I got the server with the configuration above. This is the important part of

  • 0

I got the server with the configuration above.

This is the important part of my deploy.rb recipe:

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

set :rvm_ruby_string, 'ruby-1.9.2-p290'
set :rvm_type, :system
set :bundle_flags, "--deployment"

set :default_environment, {
  'PATH' => ENV['PATH'],
  'RAILS_ENV' => ENV['RAILS_ENV']
}

set :stages, %w(staging production)
require 'capistrano/ext/multistage'

Running cap staging deploy as is, leads to an error:

* executing "cd /mnt/data-store/project/releases/shared &&
bundle install --gemfile /mnt/data-store/project/releases/shared/Gemfile
--path /mnt/data-store/project/shared/bundle --deployment --without development test"

** [out :: localhost] The --deployment flag requires a Gemfile.lock.
Please make sure you have checked your Gemfile.lock into version control
before deploying.

... rolling back ...

failed: "env PATH=... RAILS_ENV=staging rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.2-p290' -c 'cd /mnt/data-store/project/releases/shared && bundle install --gemfile /mnt/data-store/project/releases/shared/Gemfile --path /mnt/data-store/project/shared/bundle --deployment --without development test'" on localhost

Gemfile and Gemfile.lock are in the source control. I ran bundle install locally first to generate the .lock file. But the bundler/capistrano points to /mnt/data-store/project/releases/shared/Gemfile so I just copied manually both files there. I’m sure I’m doing it wrong here. I guess it should be copied automatically.

Executed deploy again (1) and it didn’t fail on the bundle install, it even had

Your bundle is complete! It was installed into /mnt/data-store/project/shared/bundle in the output.

BUT, one of my cap tasks executes a rake. The result of this is:
*Could not find bcrypt-ruby-3.0.1 in any of the sources
*Try running bundle install.

Proceeding with my adventure, I discovered that once you have .bundle/config with
BUNDLE_PATH: /mnt/data-store/project/shared/bundle
It works.
I had this directory, probably created by bundler, under /mnt/data-store/releases/shared/, so I copied manually to the rails root.

Now, rake/rails c work.

bundle show twitter shows .../shared/bundle/ruby/1.9.1/gems/twitter-1.7.1.

BUT, redeploying brings me back to (1), because the .bundle dir isn’t there.

Concrete questions:

  1. Do I need to create/copy .bundle/config manually?
  2. Do I need to copy Gemfile/Gemfile.lock manually to the shared dir? What happens if I add gems? Should I hold two copies, or manually/programmatically sync them?
  3. WHAT AM I DOING WRONG?

Thanks!

  • 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-25T15:56:40+00:00Added an answer on May 25, 2026 at 3:56 pm

    Look at this part in the deployment.rb file (Bundler code)

    args = ["--gemfile #{File.join(context.fetch(:current_release), bundle_gemfile)}"]
    args << "--path #{bundle_dir}" unless bundle_dir.to_s.empty?
    

    There’s a key called :current_release, this key is probably not being set correctly with Capistrano for some reason.

    the :current_release in bundler will point to the “shared” folder instead of the latest release (with the timestamp)

    This is getting executed on before 'deploy:finalize_update'.

    What I would do in order to fix this is to add your own hook on this event.

    before 'deploy:finalize_update', 'x:set_current_release'
    

    And this is the actual method

    task :set_current_release, :roles => :app do
        set :current_release, latest_release
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the above error when i deploy my web application into windows server
I've got build server running CruiseControl.NET and recently it started throwing this error on
I've got an Apache server that has one access log file that is topping
I have WCF service hosted by Windows service. This is my app.config file (server-side)
I've got mongodb running in following configuration: 1 config server, 2 mongos, 8 shards
We've got VisualSVN Server set up as our Subversion server on Windows, and we
We've got a server over which we're running a Django powered site. Since we
We got a TeamCity server which produces nightly deployable builds. We want our beta
Recently we got a new server at the office purely for testing purposes. It
We've got a Java server application that runs on a number of computers, all

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.