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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:05:30+00:00 2026-06-06T17:05:30+00:00

I am trying to deploy and I do not want the Gemfile.lock in version

  • 0

I am trying to deploy and I do not want the Gemfile.lock in version control. But when it’s removed I get the following error.

* executing "cd /var/www/vhosts/my-site/releases/20120628162217 && bundle install --       gemfile /var/www/vhosts/mysite/releases/20120628162217/Gemfile --path  /var/www/vhosts/my-site/shared/bundle --deployment --quiet --without development test cucumber  analytics"
    servers: ["staging-beta.my-site.com"]
[staging-beta.my-sitehealth.com] executing command
** [out :: staging-beta.my-site.com] The --deployment flag requires a Gemfile.lock.     Please make sure you have checked your Gemfile.lock into version control before deploying.
    command finished in 332ms

Here is my deploy.rb file:

require 'thinking_sphinx/deploy/capistrano'

set :rvm_ruby_string, '1.9.3'

# Ignore the .git directory when creating a release
set :copy_exclude, ".git*"

set :stages, %w(production staging rails_ec2_west_staging vagrant analytics highgroove ec2_highgroove stage_analytics ec2_staging highgroove_staging ec2_chef ec2_sphinx_chef solr_staging ec2_sphinx_prod_chef)
set :default_stage, "staging"

set :bundle_without, [:development, :test, :cucumber, :analytics]
require 'bundler/capistrano'
set :custom_symlinks, {}

require 'capistrano/ext/multistage'

if ARGV.first == 'ec2_staging'
  require 'rvm/capistrano'
  # for dual deploys on ec2 staging
  set :application, "my-site3"
else
  set :application, "my-site"
end

set :use_sudo, false
set :user, "www-data"
set :group, "www-data"

ssh_options[:forward_agent] = true

set :branch, $1 if `git branch` =~ /\* (\S+)\s/m

set :scm, :git
set :repository, "git@github.com:my-company/my-site3.git"
set :deploy_to, "/var/www/vhosts/#{application}"
set :deploy_via, :remote_cache
set :deploy_env, 'production'

# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts

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

   task :seed, :roles => :db do
     rake = fetch(:rake, "rake")
     rails_env = fetch(:rails_env, "production")

     run "cd #{current_path} && #{rake} RAILS_ENV=#{rails_env} db:seed"
   end

end

namespace :assets do
  task :precompile do
    run "cd #{current_path} && #{rake} RAILS_ENV=#{rails_env} my-site-web:assets:precompile"
  end
end

task :uname do
  run "uname -a"
end

after "deploy:update", "deploy:cleanup"
after "deploy:update", "assets:precompile"

require './config/boot'
#require 'airbrake/capistrano'
  • 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-06T17:05:32+00:00Added an answer on June 6, 2026 at 5:05 pm

    It’s the best practice to include the gemfile.lock. From Bundlers rational page: http://gembundler.com/rationale.html

    This is important: the Gemfile.lock makes your application a single package of both your own code and the third-party code it ran the last time you know for sure that everything worked. Specifying exact versions of the third-party code you depend on in your Gemfile would not provide the same guarantee, because gems usually declare a range of versions for their dependencies.

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

Sidebar

Related Questions

I'm trying to deploy a windows service but not quite sure how to do
I seemed to get the following exception when trying to deploy my application: Caused
I'm trying to deploy database project ( dbproj format, not new SSDT sqlproj )
I'm trying to deploy a Sinatra app to Dreamhost and it says the following:
So I'm trying to deploy my app to heroku but it keeps giving me
I'm trying to deploy my rails application with capistrano, but I'm having some trouble
I am trying to deploy my application to our webserver, but all of my
I'm getting the following error when trying to run a JSP. I'm using Tomcat
Hi Stackoverflow, Im trying to deploy a hybrid ASP.Net Webform/mvc-project onto iis7 but the
i'm having issues trying to get the result I wish. Basically what I want

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.