我创建了一个新项目,并执行了“ cap production deploy”命令,将其上传到服务器,但出现以下错误。请帮帮我,感谢任何建议。
Your Ruby version is 2.5.7,but your Gemfile specified 2.5.3
尝试:
rvm install 2.5.3
rvm user 2.5.3 --default
相同错误。 尝试过:
sudo gem update bundler
相同错误。 我的本地计算机的版本:
macOS Catalina 10.15.3
ruby 2.5.3
rails 5.2.4.1
服务器的gem列表:
bigdecimal (default: 1.3.4)
bundler (default: 1.17.3)
bundler-unload (1.0.2)
cmath (default: 1.0.0)
csv (default: 1.0.0)
date (default: 1.0.0)
dbm (default: 1.0.0)
did_you_mean (1.2.0)
etc (default: 1.0.0)
executable-hooks (1.6.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
gdbm (default: 2.0.0)
gem-wrappers (1.4.0)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
json (default: 2.1.0)
minitest (5.10.3)
net-telnet (0.1.1)
openssl (default: 2.1.2)
power_assert (1.1.1)
psych (default: 3.0.2)
rake (12.3.0)
rdoc (default: 6.0.1)
rubygems-bundler (1.4.5)
rvm (1.11.3.9)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
test-unit (3.2.7)
webrick (default: 1.4.2)
xmlrpc (0.3.0)
zlib (default: 1.0.0)
错误信息。
07 deploy@47.115.204.72 0.087s
08 ln -s /home/deploy/rails101/shared/public/assets /home/deploy/rails101/releases/2020…
✔ 08 deploy@47.115.204.72 0.085s
00:31 bundler:install
01 bundle install --path /home/deploy/rails101/shared/bundle --jobs 4 --without develop…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constan…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constan…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constan…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constan…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constan…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constan…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constan…
01 [DEPRECATED] The `--deployment` flag is deprecated because it relies on being rememb…
01 [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered a…
01 [DEPRECATED] The `--without` flag is deprecated because it relies on being remembere…
01 /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constan…
01 Your Ruby version is 2.5.7,but your Gemfile specified 2.5.3
#<Thread:0x00007fd4679216a0@/Users/jinzesu/.rvm/gems/ruby-2.5.3/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:10 run> terminated with exception (report_on_exception is true):
Traceback (most recent call last):
1: from /Users/jinzesu/.rvm/gems/ruby-2.5.3/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
/Users/jinzesu/.rvm/gems/ruby-2.5.3/gems/sshkit-1.21.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing as deploy@47.115.204.72: bundle exit status: 18 (SSHKit::Runner::ExecuteError)
bundle stdout: Nothing written
bundle stderr: /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations,which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`,and stop using this flag
[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations,which bundler will no longer do in future versions. Instead please use `bundle config set path '/home/deploy/rails101/shared/bundle'`,and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations,which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`,and stop using this flag
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
Your Ruby version is 2.5.7,but your Gemfile specified 2.5.3
Here are the last 20 lines:** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:
DEBUG [40b6b8c6] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [40b6b8c6] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [40b6b8c6] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [40b6b8c6] [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations,and stop using this flag
DEBUG [40b6b8c6] Your Ruby version is 2.5.7,but your Gemfile specified 2.5.3
DEBUG [40b6b8c6] Finished in 0.241 seconds with exit status 18 (failed).
INFO [5545e7a1] Running /usr/bin/env bundle install --path /home/deploy/rails101/shared/bundle --jobs 4 --without development test --deployment --quiet as deploy@47.115.204.72
DEBUG [5545e7a1] Command: cd /home/deploy/rails101/releases/20200311033408 && /usr/bin/env bundle install --path /home/deploy/rails101/shared/bundle --jobs 4 --without development test --deployment --quiet
DEBUG [5545e7a1] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [5545e7a1] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [5545e7a1] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:29: warning: constant Gem::ConfigMap is deprecated
/usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:30: warning: constant Gem::ConfigMap is deprecated
DEBUG [5545e7a1] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [5545e7a1] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [5545e7a1] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [5545e7a1] [DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations,and stop using this flag
DEBUG [5545e7a1] [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations,and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations,and stop using this flag
DEBUG [5545e7a1] /usr/lib/ruby/vendor_ruby/rubygems/defaults/operating_system.rb:10: warning: constant Gem::ConfigMap is deprecated
DEBUG [5545e7a1] Your Ruby version is 2.5.7,but your Gemfile specified 2.5.3
该项目的github:enter link description here