简体   繁体   中英

Puma gem not found when deploying with Capistrano

I want to deploy my application with Capistrano and Puma to a VPS, but every time I get this error:

INFO [17b91266] Running RBENV_ROOT=~/.rbenv RBENV_VERSION=2.2.4 ~/.rbenv/bin/rbenv exec bundle exec puma -C /home/deploy/applications/app/shared/puma.rb --daemon as deploy@11.111.11.11
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as deploy@11.111.11.11: Exception while executing as deploy@11.111.11.11: bundle exit status: 127
bundle stdout: bundler: command not found: puma
Install missing gem executables with `bundle install`
bundle stderr: Nothing written

Gemfile:

gem 'puma'
group :production do
  gem 'capistrano-rails'
  gem 'capistrano-bundler'
  gem 'capistrano-rbenv'
  gem 'capistrano3-puma'
end

Capfile:

require 'capistrano/setup'
require 'capistrano/deploy'
require 'capistrano/rbenv'
require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/puma'

Update:

Solved the problem. I didn't update branch "master" with the last changes.

看起来您需要在服务器上运行rbenv rehash ,这就是为什么它找不到puma可执行文件的原因

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM