Ruby on rails 生产中未安装Rails gems(无论何时)

Ruby on rails 生产中未安装Rails gems(无论何时),ruby-on-rails,ruby-on-rails-4,whenever,whenever-capistrano,Ruby On Rails,Ruby On Rails 4,Whenever,Whenever Capistrano,我正在部署一个带有capistrano的rails应用程序,但得到一个错误,即没有安装 DEBUG [36f4c99a] bundler: command not found: whenever DEBUG [36f4c99a] Install missing gem executables with `bundle install` cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as dep

我正在部署一个带有capistrano的rails应用程序,但得到一个错误,即没有安装

DEBUG [36f4c99a]    bundler: command not found: whenever
DEBUG [36f4c99a]    Install missing gem executables with `bundle install`
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@xxx.xx.xx.xxx: bundle exit status: 127
bundle stdout: bundler: command not found: whenever
Install missing gem executables with `bundle install`
bundle stderr: Nothing written
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:16:in `rescue in block (2 levels) in execute'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
SSHKit::Command::Failed: bundle exit status: 127
bundle stdout: bundler: command not found: whenever
Install missing gem executables with `bundle install`
bundle stderr: Nothing written
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/command.rb:95:in `exit_status='
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:179:in `block in _execute'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `tap'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:133:in `_execute'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:66:in `execute'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/whenever-0.9.4/lib/whenever/tasks/whenever.rake:9:in `block (3 levels) in setup_whenever_task'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/abstract.rb:85:in `with'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/whenever-0.9.4/lib/whenever/tasks/whenever.rake:8:in `block (2 levels) in setup_whenever_task'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/abstract.rb:77:in `within'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/whenever-0.9.4/lib/whenever/tasks/whenever.rake:7:in `block in setup_whenever_task'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `instance_exec'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/backends/netssh.rb:54:in `run'
/Users/batman/.rvm/gems/ruby-2.2.0/gems/sshkit-1.7.1/lib/sshkit/runners/parallel.rb:13:in `block (2 levels) in execute'
Tasks: TOP => whenever:update_crontab
(See full trace by running task with --trace)
如果我在服务器上手动安装gem,那么我会得到另一个丢失的gem错误,该错误将继续

/home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/spec_set.rb:92:in `block in materialize'
DEBUG [98da4528]    :
DEBUG [98da4528]    Could not find i18n-0.7.0 in any of the sources
DEBUG [98da4528]     (
DEBUG [98da4528]    Bundler::GemNotFound
DEBUG [98da4528]    )
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/spec_set.rb:85:in `map!'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/spec_set.rb:85:in `materialize'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/definition.rb:132:in `specs'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/definition.rb:177:in `specs_for'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/definition.rb:166:in `requested_specs'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/environment.rb:18:in `requested_specs'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/runtime.rb:13:in `setup'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler.rb:122:in `setup'
DEBUG [98da4528]        from /home/deploy/.rvm/gems/ruby-2.2.0/gems/bundler-1.9.7/lib/bundler/setup.rb:18:in `<top (required)>'
DEBUG [98da4528]        from /home/deploy/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
DEBUG [98da4528]        from /home/deploy/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
cap aborted!

对我来说,你似乎没有补充

require 'capistrano/bundler'

到你的档案。这将在部署时安装所有gems。

能否显示deploy.rb文件,您可以在其中随时调用?
Capfile
require 'capistrano/bundler'