Closed antonichuk closed 7 years ago
Can you please follow ISSUES.md and provide us with more information to help you.
I'm deploying application via capistrano as usual - cap qa deploy, and got this error when capistrano run 'bundle install':
executing "cd /home/deployer/app/releases/20170224081203 && bundle install --gemfile /home/deployer/app/releases/20170224081203/Gemfile --path /home/deployer/app/shared/bundle --deployment --quiet --without development test
You are trying to install in deployment mode after changing Gemfile. Run
bundle installelsewhere and add the updated Gemfile.lock to version control. the gemspecs for path gems changed
$ bundle env
Bundler 1.14.5 Rubygems 2.0.3 Ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux] Git 1.9.1 Platform x86_64-linux
When I downgrade bundler to version 1.14.4 - all works fine, deployment process pass without any issue.
Are you changing your gem source to a Gemstash server or something similar like in #5465 when deploying by any chance?
Does the Gemfile
or Gemfile.lock
have a source
block with credentials in it?
@colby-swandale - No, we don't change anything
@olleolleolle - No, we don't have any source block with credentials in Gemfile or Gemfile.lock
Thanks @antonichuk, can just you provide us with the full output of bundle env
and we'll look into it.
$ bundle env '## Environment'
Bundler 1.14.5
Rubygems 2.0.14.1
Ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux-gnu]
Git 1.9.1
Platform x86_64-linux
rubygems-bundler (1.4.4)
can you please provide us with the full output of bundle env
`$ bundle env
Bundler 1.14.5
Rubygems 2.0.14.1
Ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux-gnu]
Git 1.9.1
Platform x86_64-linux
rubygems-bundler (1.4.4)
frozen
Set for your local app (/home/deployer/app/releases/20170224103203/.bundle/config): "1"
path
Set for your local app (/home/deployer/app/releases/20170224103203/.bundle/config): "/home/deployer/app/shared/bundle"
without
Set for your local app (/home/deployer/app/releases/20170224103203/.bundle/config): "development:test"
disable_shared_gems
Set for your local app (/home/deployer/app/releases/20170224103203/.bundle/config): "true"
source 'http://rubygems.org'
gem 'rails', '~> 3.2.16'
gem 'mysql2', '~> 0.3.20'
gem 'foreigner'
gem 'devise', '~> 1.5.3'
# This gem is a C binding to the excellent YAJL JSON parsing and generation library.
gem 'yajl-ruby', '~> 1.2.1'
gem 'faraday', '0.8.9'
gem 'stretcher', '~> 1.21.1' # ElasticSearch client
gem 'sidekiq', '~> 1.2.1'
gem 'ublisherp', path: 'vendor/gems/ublisherp-e622c3e4b64d'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'yui-compressor', '~> 0.9.6'
gem 'uglifier', '>= 1.0.3'
gem 'therubyracer', '~> 0.12', require: 'v8'
gem 'ejs'
end
gem 'jquery-rails', '~> 1.0.17'
gem 'stomp', '~> 1.1.10'
gem 'acts-as-taggable-on', path: 'vendor/gems/acts-as-taggable-on-a7a5a275d621'
gem 'kaminari', '~> 0.16.3'
gem 'acts_as_list', '~> 0.1.4'
gem 'simple_form', '~> 1.5.2'
gem 'ffi', '1.9.14'
gem 'georuby' # for tag locations
gem 'georuby-ext' # for tag locations
# sudo apt-get install libproj-dev libgeos-dev libffi-dev # required libraries for georuby-ext
gem 'hiredis', '~> 0.6'
gem 'redis', '~> 2.2.2', require: ['redis/connection/hiredis', 'redis']
gem 'ohm', '~> 0.1.5'
gem 'ohm-contrib', '~> 0.1.2'
gem 'daemons', '~> 1.1.4'
gem 'trollop', '~> 1.16.2'
gem 'whenever', '~> 0.7.0'
gem 'custom_configuration'
gem 'redcarpet'
gem 'carrierwave', '~> 0.6.1'
gem 'fog'
gem 'mini_magick', '~> 3.3'
gem 'data_uri', '0.1.0'
gem 'honeybadger', '~> 2.0.0'
gem 'pusher', '~> 0.9.2'
gem 'twitter-text', '~> 1.4'
gem 'rack-mini-profiler'
group :development do
gem 'conan', '0.4.7'
gem 'thin'
#gem 'pry'
#gem 'pry-nav'
#gem 'pry-remote'
gem 'byebug'
end
gem 'servolux'
gem "twitter"
gem "instagram"
gem 'aws-sdk-core'
group :test do
# Pretty printed test output
gem 'purdytest', '~> 1.0', require: false
gem 'minitest', '~> 2.7.0'
gem 'minitest-reporters'
#gem 'capybara', '~> 1.1'
gem 'launchy', '~> 2.0'
gem 'mocha', '~> 0.10', require: false
gem 'timecop', '~> 0.3.5'
gem 'webmock'
gem 'sham_rack'
end
group :test, :development do
gem 'jasmine-rails'
#gem 'pry-debugger'
end
# Just to add fake news..
gem 'factory_girl_rails', '~> 1.4.0'
gem 'faker', '~> 1.0'
gem 'foreman'
gem 'flickraw'
gem 'nokogiri'
gem 'httparty'
gem 'api-auth'
gem 'cape', '~> 1'
PATH
remote: vendor/gems/acts-as-taggable-on-a7a5a275d621
specs:
acts-as-taggable-on (2.2.2)
rails (~> 3.0)
PATH
remote: vendor/gems/ublisherp-e622c3e4b64d
specs:
ublisherp (0.0.1)
activemodel (>= 3.2, < 5)
activesupport (>= 3.2)
hooks (~> 0.3.1)
multi_json (~> 1.0)
oj (~> 2.0.11)
redis
redis-namespace
GEM
remote: http://rubygems.org/
specs:
CFPropertyList (2.3.3)
POpen4 (0.1.4)
Platform (>= 0.4.0)
open4
Platform (0.4.0)
actionmailer (3.2.22.5)
actionpack (= 3.2.22.5)
mail (~> 2.5.4)
actionpack (3.2.22.5)
activemodel (= 3.2.22.5)
activesupport (= 3.2.22.5)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.4)
rack (~> 1.4.5)
rack-cache (~> 1.2)
rack-test (~> 0.6.1)
sprockets (~> 2.2.1)
activemodel (3.2.22.5)
activesupport (= 3.2.22.5)
builder (~> 3.0.0)
activerecord (3.2.22.5)
activemodel (= 3.2.22.5)
activesupport (= 3.2.22.5)
arel (~> 3.0.2)
tzinfo (~> 0.3.29)
activeresource (3.2.22.5)
activemodel (= 3.2.22.5)
activesupport (= 3.2.22.5)
activesupport (3.2.22.5)
i18n (~> 0.6, >= 0.6.4)
multi_json (~> 1.0)
acts_as_list (0.1.9)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
ansi (1.5.0)
api-auth (2.0.1)
arel (3.0.3)
aws-sdk-core (2.6.27)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sigv4 (1.0.0)
bcrypt (3.1.11)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
builder (3.0.4)
byebug (1.8.2)
columnize (~> 0.3.6)
debugger-linecache (~> 1.2.0)
cape (1.8.0)
capistrano (2.12.0)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
carrierwave (0.6.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
celluloid (0.10.0)
chronic (0.6.7)
columnize (0.3.6)
conan (0.4.7)
capistrano (~> 2.12.0)
fog
json (~> 1.6.1)
connection_pool (0.9.3)
crack (0.4.3)
safe_yaml (~> 1.0.0)
custom_configuration (0.0.2)
railties (> 3.0)
daemons (1.1.9)
data_uri (0.1.0)
dbf (3.0.8)
debugger-linecache (1.2.0)
devise (1.5.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.1)
dr-ffi-proj4 (0.0.3)
ffi (>= 1.0.0)
ejs (1.1.1)
erubis (2.7.0)
eventmachine (1.2.1)
excon (0.54.0)
execjs (2.7.0)
factory_girl (2.3.2)
activesupport
factory_girl_rails (1.4.0)
factory_girl (~> 2.3.0)
railties (>= 3.0.0)
faker (1.6.6)
i18n (~> 0.5)
faraday (0.8.9)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.2)
faraday (>= 0.7.4, < 0.10)
faraday_middleware-multi_json (0.0.6)
faraday_middleware
multi_json
ffi (1.9.14)
ffi-geos (1.1.1)
ffi (>= 1.0.0)
fission (0.5.0)
CFPropertyList (~> 2.2)
flickraw (0.9.9)
fog (1.38.0)
fog-aliyun (>= 0.1.0)
fog-atmos
fog-aws (>= 0.6.0)
fog-brightbox (~> 0.4)
fog-cloudatcost (~> 0.1.0)
fog-core (~> 1.32)
fog-dynect (~> 0.0.2)
fog-ecloud (~> 0.1)
fog-google (<= 0.1.0)
fog-json
fog-local
fog-openstack
fog-powerdns (>= 0.1.1)
fog-profitbricks
fog-rackspace
fog-radosgw (>= 0.0.2)
fog-riakcs
fog-sakuracloud (>= 0.0.4)
fog-serverlove
fog-softlayer
fog-storm_on_demand
fog-terremark
fog-vmfusion
fog-voxel
fog-vsphere (>= 0.4.0)
fog-xenserver
fog-xml (~> 0.1.1)
ipaddress (~> 0.5)
fog-aliyun (0.1.0)
fog-core (~> 1.27)
fog-json (~> 1.0)
ipaddress (~> 0.8)
xml-simple (~> 1.1)
fog-atmos (0.1.0)
fog-core
fog-xml
fog-aws (0.12.0)
fog-core (~> 1.38)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-brightbox (0.11.0)
fog-core (~> 1.22)
fog-json
inflecto (~> 0.0.2)
fog-cloudatcost (0.1.2)
fog-core (~> 1.36)
fog-json (~> 1.0)
fog-xml (~> 0.1)
ipaddress (~> 0.8)
fog-core (1.43.0)
builder
excon (~> 0.49)
formatador (~> 0.2)
fog-dynect (0.0.3)
fog-core
fog-json
fog-xml
fog-ecloud (0.3.0)
fog-core
fog-xml
fog-google (0.1.0)
fog-core
fog-json
fog-xml
fog-json (1.0.2)
fog-core (~> 1.0)
multi_json (~> 1.10)
fog-local (0.3.1)
fog-core (~> 1.27)
fog-openstack (0.1.17)
fog-core (>= 1.40)
fog-json (>= 1.0)
ipaddress (>= 0.8)
fog-powerdns (0.1.1)
fog-core (~> 1.27)
fog-json (~> 1.0)
fog-xml (~> 0.1)
fog-profitbricks (3.0.0)
fog-core (~> 1.42)
fog-json (~> 1.0)
fog-rackspace (0.1.2)
fog-core (>= 1.35)
fog-json (>= 1.0)
fog-xml (>= 0.1)
ipaddress (>= 0.8)
fog-radosgw (0.0.5)
fog-core (>= 1.21.0)
fog-json
fog-xml (>= 0.0.1)
fog-riakcs (0.1.0)
fog-core
fog-json
fog-xml
fog-sakuracloud (1.7.5)
fog-core
fog-json
fog-serverlove (0.1.2)
fog-core
fog-json
fog-softlayer (1.1.4)
fog-core
fog-json
fog-storm_on_demand (0.1.1)
fog-core
fog-json
fog-terremark (0.1.0)
fog-core
fog-xml
fog-vmfusion (0.1.0)
fission
fog-core
fog-voxel (0.1.0)
fog-core
fog-xml
fog-vsphere (1.2.1)
fog-core
rbvmomi (~> 1.8.0)
fog-xenserver (0.2.3)
fog-core
fog-xml
fog-xml (0.1.2)
fog-core
nokogiri (~> 1.5, >= 1.5.11)
foreigner (1.7.4)
activerecord (>= 3.0.0)
foreman (0.82.0)
thor (~> 0.19.1)
formatador (0.2.5)
geokit (1.6.7)
multi_json (>= 1.3.2)
georuby (2.2.1)
georuby-ext (0.0.5)
activesupport (>= 3.2.6)
dbf
dr-ffi-proj4 (>= 0.0.3)
ffi-geos (>= 0.1.1)
geokit (= 1.6.7)
georuby (>= 1.9.8)
rgeo (>= 0.3.20)
hashdiff (0.3.0)
hashie (3.4.6)
highline (1.7.8)
hike (1.2.3)
hiredis (0.6.1)
honeybadger (2.0.12)
hooks (0.3.6)
uber (~> 0.0.4)
httparty (0.14.0)
multi_xml (>= 0.5.2)
i18n (0.7.0)
inflecto (0.0.2)
instagram (1.1.6)
faraday (>= 0.7, < 0.10)
faraday_middleware (>= 0.8, < 0.10)
hashie (>= 0.4.0)
multi_json (~> 1.0, >= 1.0.3)
ipaddress (0.8.3)
jasmine-core (2.5.2)
jasmine-rails (0.14.1)
jasmine-core (>= 1.3, < 3.0)
phantomjs (>= 1.9)
railties (>= 3.2.0)
sprockets-rails
jmespath (1.3.1)
journey (1.0.4)
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.8)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
launchy (2.4.3)
addressable (~> 2.3)
libv8 (3.16.14.17)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
metaclass (0.0.4)
mime-types (1.25.1)
mini_magick (3.8.1)
subexec (~> 0.2.1)
mini_portile2 (2.1.0)
minitest (2.7.0)
minitest-reporters (0.9.0)
ansi
builder
minitest (>= 2.0, < 4.0)
powerbar
mocha (0.14.0)
metaclass (~> 0.0.1)
multi_json (1.12.1)
multi_xml (0.5.5)
multipart-post (1.2.0)
mysql2 (0.3.21)
nest (1.1.2)
redis
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (3.2.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
ohm (0.1.5)
nest (~> 1.0)
ohm-contrib (0.1.2)
ohm
oj (2.0.14)
open4 (1.3.4)
orm_adapter (0.0.7)
phantomjs (2.1.1.0)
polyglot (0.3.5)
powerbar (1.0.17)
hashie (>= 1.1.0)
public_suffix (2.0.4)
purdytest (1.0.0)
minitest (~> 2.2)
pusher (0.9.4)
multi_json (~> 1.0)
signature (~> 0.1.2)
rack (1.4.7)
rack-cache (1.6.1)
rack (>= 0.4)
rack-mini-profiler (0.10.1)
rack (>= 1.2.0)
rack-ssl (1.3.4)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (3.2.22.5)
actionmailer (= 3.2.22.5)
actionpack (= 3.2.22.5)
activerecord (= 3.2.22.5)
activeresource (= 3.2.22.5)
activesupport (= 3.2.22.5)
bundler (~> 1.0)
railties (= 3.2.22.5)
railties (3.2.22.5)
actionpack (= 3.2.22.5)
activesupport (= 3.2.22.5)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (>= 0.14.6, < 2.0)
rake (11.3.0)
rbvmomi (1.8.2)
builder
nokogiri (>= 1.4.1)
trollop
rdoc (3.12.2)
json (~> 1.4)
redcarpet (3.3.4)
redis (2.2.2)
redis-namespace (1.1.1)
redis (< 3.0.0)
ref (2.0.0)
rgeo (0.5.3)
safe_yaml (1.0.4)
servolux (0.12.0)
sham_rack (1.3.6)
rack
sidekiq (1.2.1)
celluloid (~> 0.10.0)
connection_pool (~> 0.9.0)
multi_json (~> 1)
redis
redis-namespace
signature (0.1.8)
simple_form (1.5.2)
actionpack (~> 3.0)
activemodel (~> 3.0)
simple_oauth (0.3.1)
sprockets (2.2.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (0.0.1)
sprockets (>= 1.0.2)
stomp (1.1.10)
stretcher (1.21.1)
excon (>= 0.16)
faraday (~> 0.8)
faraday_middleware (~> 0.9.0)
faraday_middleware-multi_json (~> 0.0.5)
hashie (>= 1.2.0)
multi_json (>= 1.0)
subexec (0.2.3)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thin (1.7.0)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.19.1)
tilt (1.4.1)
timecop (0.3.5)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
trollop (1.16.2)
twitter (4.8.1)
faraday (~> 0.8, < 0.10)
multi_json (~> 1.0)
simple_oauth (~> 0.2)
twitter-text (1.14.1)
unf (~> 0.1.0)
tzinfo (0.3.52)
uber (0.0.15)
uglifier (3.0.3)
execjs (>= 0.3.0, < 3)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
warden (1.2.6)
rack (>= 1.0)
webmock (2.1.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
whenever (0.7.3)
activesupport (>= 2.3.4)
chronic (~> 0.6.3)
xml-simple (1.1.5)
yajl-ruby (1.2.1)
yui-compressor (0.9.6)
POpen4 (>= 0.1.4)
PLATFORMS
ruby
DEPENDENCIES
acts-as-taggable-on!
acts_as_list (~> 0.1.4)
api-auth
aws-sdk-core
byebug
cape (~> 1)
carrierwave (~> 0.6.1)
conan (= 0.4.7)
custom_configuration
daemons (~> 1.1.4)
data_uri (= 0.1.0)
devise (~> 1.5.3)
ejs
factory_girl_rails (~> 1.4.0)
faker (~> 1.0)
faraday (= 0.8.9)
ffi (= 1.9.14)
flickraw
fog
foreigner
foreman
georuby
georuby-ext
hiredis (~> 0.6)
honeybadger (~> 2.0.0)
httparty
instagram
jasmine-rails
jquery-rails (~> 1.0.17)
kaminari (~> 0.16.3)
launchy (~> 2.0)
mini_magick (~> 3.3)
minitest (~> 2.7.0)
minitest-reporters
mocha (~> 0.10)
mysql2 (~> 0.3.20)
nokogiri
ohm (~> 0.1.5)
ohm-contrib (~> 0.1.2)
purdytest (~> 1.0)
pusher (~> 0.9.2)
rack-mini-profiler
rails (~> 3.2.16)
redcarpet
redis (~> 2.2.2)
servolux
sham_rack
sidekiq (~> 1.2.1)
simple_form (~> 1.5.2)
stomp (~> 1.1.10)
stretcher (~> 1.21.1)
therubyracer (~> 0.12)
thin
timecop (~> 0.3.5)
trollop (~> 1.16.2)
twitter
twitter-text (~> 1.4)
ublisherp!
uglifier (>= 1.0.3)
webmock
whenever (~> 0.7.0)
yajl-ruby (~> 1.2.1)
yui-compressor (~> 0.9.6)
BUNDLED WITH
1.13.6
Had you previously installed with --deployment
? I fixed a bug in lockfile generation after packaging, so this is a one time migration to get the correct behavior
@segiddins
Output deployment log with installed bundler 1.14.4:
executing deploy:finalize_update' triggering before callbacks for
deploy:finalize_update'
executing `bundle:install'
executing "cd /home/deployer/app/releases/20170224103203 && bundle install --gemfile /home/deployer/app/releases/20170224103203/Gemfile --path /home/deployer/app/shared/bundle --deployment --quiet --without development test"
servers: ["qa-app.com"]
executing command
command finished in 13039ms
I'm having the same problem with 1.14.6. Downgrading to 1.14.4 alleviates the problem.
For what it's worth, it looks like the error is being caused by a vendored gem.
the gemspecs for path gems changed
I'm having the same problem, a couple of local gems aren't being packaged properly under bundler > 1.14.4.
# Gemfile
source 'https://rubygems.org'
gem 'auth_integration', path: (Pathname.new('../auth_integration').realpath rescue 'vendor/cache/auth_integration')
gem 'cedar_client', path: (Pathname.new('../cedar_client').realpath rescue 'vendor/cache/cedar_client')
The Pathname business is my workaround to make sure the gem path is correct in both development and production. It worked perfectly with bundle package --all
in 1.14.4, but something changed with 1.14.5:
# Gemfile.lock (bundler 1.14.4)
PATH
remote: vendor/cache/auth_integration
specs:
...
PATH
remote: vendor/cache/cedar_client
specs:
...
# Gemfile.lock (bundler 1.14.5)
PATH
remote: /Users/drarnfield/projects/auth_integration
specs:
...
PATH
remote: /Users/drarnfield/projects/cedar_client
specs:
...
The gems still get packaged to vendor/cache, but the source line in Gemfile.lock is wrong. The only workaround seems to be to change the gemfile to
# Gemfile
source 'https://rubygems.org'
gem 'auth_integration', path: 'vendor/cache/auth_integration'
gem 'cedar_client', path: 'vendor/cache/cedar_client'
and copy the gems to vendor/cache manually.
the issue is you're passing in an absolute path by using realpath
, so bundler is storing an absolute path
ping @antonichuk. Were you able to solve this issue?
I hardcoded installing bundler version - 1.14.4
@segiddins this seems to be a regression introduced in 1.14.5 based on @antonichuk's env--there are no absolute paths there.
gem 'auth_integration', path: (Pathname.new('../auth_integration').realpath rescue 'vendor/cache/auth_integration') Calls realpath, which I believe returns an absolute path
@segiddins wrong Gemfile, look farther up the ticket
@segiddins the absolute paths aren't the problem. When the gems were packaged before, Gemfile.lock was updated with the paths of the packaged gems (vendor/cache). In 1.14.5, the paths stay as they were. The same thing happens if you use relative paths, as @indirect mentioned.
In that case, I think one of my first comments was correct:
Had you previously installed with
--deployment
? I fixed a bug in lockfile generation after packaging, so this is a one time migration to get the correct behavior
My bad, I missed that comment (or I didn't understand that you meant "run bundle install once without --deployment"). Problem solved!
I'm seeing this in Bundler 1.15 across Heroku. https://github.com/heroku/heroku-buildpack-ruby/issues/578.
@schneems this issue appears to be resolved. Please open a new ticket with repro steps so we can investigate your issue!
I'm not convinced this is fixed. Just ran into this on my server. Only fix I could find was:
gem install bundler -v 1.14.4
gem uninstall bundler -v '1.15.3'
on the server itself. super weird.
I ran into this issue via Capistrano. Capistrano deploys default the bundle install command with the --deployment --quiet flags. I was able to set :bundle_flags, "--quiet"
in my deploy.rb file in order to successfully deploy, if that helps anybody.
Whenever I attempt to remove the config overrides it continues to fail, so I'm not sure it's a "run bundle install without --deployment once" solution, at least in my case.
@dlinch please open a new issue with the details of your problem.
I get the same issue as @dlinch on a Debian 9 server. The same application is deployed without any problems on Ubuntu 16.04. It's weird. In both distributions, Ruby is installed on RVM.
I don't want to remove --deployment flag.
@patdec I think I remember what my problem was; I believe it ultimately had something to do with having a gitconfig on my local to use https to download gems pointing to a remote, but the server didn't have the same config so when they went to download the gems they get a slightly different gemfile.lock and that's where the disparity came from. Rails 5 projects have the config already added to the Gemfile to use https but rails 4 projects don't, so that could be it for you?
Thanks @dlinch ! I will check this.
I fixed the issue by downgrading Bundler from 1.16.1 to 1.14.4 according the previous comments.
I read a dozen solutions on different resources but didn't find exactly what could help me in this situation
So I did find a solution. Exactly saying i read the error message attentively and there was a sollution: Run bundle install elsewhere. "Elsewhere" was my Cloud9 where i developed my app. So my steps
rsync
commandbundle install
. in this case you will have a changed version of Gemfile.lockrsync
bundle install --deployment --without development test
DONE! Wish GOOD luck for all!I also encountered this issue and wasted several hours to try different solutions, change bundler config, reinstall bundler, reinstall ruby and rvm, upgrade gem, etc. Finally, when I was brushing my tooth at mid-night, I realized the key point. for my case, the answer is in this sentence 'The gemspecs for path gems changed'. I have a gem with relative path in my gemfile, one team member updated the gemspec of this gem, I did not pull those new commits. So, when I deploy with mina, the remote Gemfile.lock was not the same with my local one. My solution is, check gems with path in gemfile.
After upgrading bundler to 1.14.5 version, we got error during deployment:
You are trying to install in deployment mode after changing your Gemfile. Run
bundle install
elsewhere and add the updated Gemfile.lock to version control. the gemspecs for path gems changedGemfile and Gemfile.lock were not changed.