cap 部署 + rbenv:捆绑:找不到命令

2023-12-07

我正在关注https://gorails.com/deploy/ubuntu/16.04

我正在运行:“bundle exec cap 生产部署” 并收到以下错误:

    ✔ 10 [email protected] 0.289s
00:21 bundler:install
      01 $HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/deploy_test1/shared/bundle --without development test --deployment --q…
      01 rbenv: bundle: command not found
      01
      01 The `bundle' command exists in these Ruby versions:
      01   2.4.0
      01
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions:
  2.4.0

SSHKit::Command::Failed: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions:
  2.4.0

Tasks: TOP => deploy:updated => bundler:install
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing as [email protected]: bundle exit status: 127
bundle stdout: Nothing written
bundle stderr: rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions:
  2.4.0


** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last 20 lines:


 DEBUG [3de26178] Command: ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.1" ; /usr/bin/env ln -s /home/deploy/deploy_test1/shared/public/assets /home/deploy/deploy_test1/releases/20170509194018/public/assets )

  INFO [3de26178] Finished in 0.289 seconds with exit status 0 (successful).

 DEBUG [25920183] Running if test ! -d /home/deploy/deploy_test1/releases/20170509194018; then echo "Directory does not exist '/home/deploy/deploy_test1/releases/20170509194018'" 1>&2; false; fi as [email protected]

 DEBUG [25920183] Command: if test ! -d /home/deploy/deploy_test1/releases/20170509194018; then echo "Directory does not exist '/home/deploy/deploy_test1/releases/20170509194018'" 1>&2; false; fi

 DEBUG [25920183] Finished in 0.291 seconds with exit status 0 (successful).

 DEBUG [7b4c3ff7] Running $HOME/.rbenv/bin/rbenv exec bundle check --path /home/deploy/deploy_test1/shared/bundle as [email protected]

 DEBUG [7b4c3ff7] Command: cd /home/deploy/deploy_test1/releases/20170509194018 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.1" ; $HOME/.rbenv/bin/rbenv exec bundle check --path /home/deploy/deploy_test1/shared/bundle )

 DEBUG [7b4c3ff7]   rbenv: bundle: command not found

 DEBUG [7b4c3ff7]   

The `bundle' command exists in these Ruby versions:

 DEBUG [7b4c3ff7]     2.4.0

 DEBUG [7b4c3ff7]   

 DEBUG [7b4c3ff7] Finished in 0.399 seconds with exit status 127 (failed).

  INFO [3bbf2dfd] Running $HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/deploy_test1/shared/bundle --without development test --deployment --quiet as [email protected]

 DEBUG [3bbf2dfd] Command: cd /home/deploy/deploy_test1/releases/20170509194018 && ( export RBENV_ROOT="$HOME/.rbenv" RBENV_VERSION="2.3.1" ; $HOME/.rbenv/bin/rbenv exec bundle install --path /home/deploy/deploy_test1/shared/bundle --without development test --deployment --quiet )

 DEBUG [3bbf2dfd]   rbenv: bundle: command not found

 DEBUG [3bbf2dfd]   

The `bundle' command exists in these Ruby versions:

 DEBUG [3bbf2dfd]     2.4.0

 DEBUG [3bbf2dfd]

“gem list”显示:两台机器上的bundler (1.14.6),以及我的生产机器和服务器上的ruby 2.4.0。 如何进行?

我正在发布我的 Capfile:

# Load DSL and set up stages
require "capistrano/setup"

# Include default deployment tasks
require "capistrano/deploy"

# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git

# If you are using rbenv add these lines:
require 'capistrano/rbenv'
set :rbenv_type, :user
set :rbenv_ruby, '2.3.1'

require 'capistrano/bundler'
require 'capistrano/rails'
require 'capistrano/passenger'

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }

我的部署.rb:

# config valid only for current version of Capistrano
lock "3.8.1"

set :application, "deploy_test1"
set :repo_url, "[email protected]:confidentialname/deploy_test1.git"

set :deploy_to, '/home/deploy/deploy_test1'

#append :linked_files, "config/database.yml", "config/secrets.yml"
append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "vendor/bundle", "public/system", "public/uploads"

看起来像rbenv设置为运行 Ruby 2.3.1。您在日志中的几个位置RBENV_VERSION="2.3.1"。根据rbenv 文档,你可以了解它是如何设置的rbenv version。如果您想测试 Ruby 2.4.0,则需要指向该版本。或者,如果您确实想在 2.3.1 上运行,则需要安装捆绑程序。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

cap 部署 + rbenv:捆绑:找不到命令 的相关文章

随机推荐

  • 无法连接到 Flask 本地服务器

    我正在尝试使用 python 和 Flask 构建一个网络应用程序 我开始在 Ubuntu 上研究它 到目前为止它可以工作 但是 将项目拉入安装了相同先决条件的 Windows 环境中是行不通的 更详细的是 运行输出看起来相当不错 Serv
  • Android SQLite如何获取特定列:行值

    我有一个数据库 我正在使用它对其进行查询 Cursor mCursor mapDb query MY TABLE new String KEY ONEID KEY TWOID trim KEY TWOID null null null nu
  • 选项卡活动中的 onActivityResult 问题

    我正在开发一个使用 tabHost 的应用程序 在这 5 个选项卡中 每个选项卡都可以打开多个活动 我的问题是 在最后一个选项卡 第五个选项卡 中 我执行了相机捕获功能 因此它打开相机并捕获图像 但在调用 onActivityResult
  • 可点击的网站图像无法在 iPhone 和 Android 设备上运行

    我的网站使用 virb com 平台 但在 iPhone 和 Android 移动设备上使用可点击图像时遇到问题 有些链接有时有效 然后就根本不起作用 这会影响网站上的两个页面 以下是我为可点击图像创建的页面链接和 HTML 代码 http
  • R:当“n”很大时,使用“(1 + 1 / n) ^ n”近似“e = exp(1)”会给出荒谬的结果

    所以 我只是在手动计算值e在 R 中 我注意到一些让我有点不安的事情 的价值e使用 R 的exp 命令 exp 1 1 2 718282 现在 我将尝试使用手动计算它x 10000 x lt 10000 y lt 1 1 x x y 1 2
  • 如何使用 GitHub 操作自动请求某人进行评论?

    我想使用 GitHub 操作 执行一些配置 自动请求 GitHub 组织中的团队进行审核 例如core 我知道您可以创建拉取请求模板 自动请求某个审阅者进行审阅 但如何在不创建模板的情况下执行此操作 综上所述 我希望在GitHub有一个团队
  • stringstream 无符号转换损坏?

    考虑这个程序 include
  • 行为类似于 Boolean 的自定义 Java 类型? [复制]

    这个问题在这里已经有答案了 我想创建一个可以以相同方式使用的类型Boolean 具体来说 我希望测试结构能够工作 if mytype System out println true 显然 该语言将其定义为特殊情况第5 1 7节 测试应用程序
  • 旋转字符串中的字母,使每个字母移动到另一个字母 n 位

    我的任务是想出一种对字符串进行编码的方法 除此之外 我需要将每个字母移动给定的数字 但转换后的字母必须是一个字母 循环移位 到目前为止我已经得到以下代码 def play pass str n letters a z to a str ch
  • 下载数据 URL 文件

    我正在考虑制作一个完全基于 JavaScript 的 zip unzip 实用程序 任何人都可以从浏览器访问 他们只需将 zip 直接拖到浏览器中即可下载其中的所有文件 他们还可以通过拖入单个文件来创建新的 zip 文件 我知道最好在服务器
  • OpenCV 图像匹配 - 从照片与表单模板

    我正在尝试检测照片是否代表填充了数据的预定义公式模板 我是图像处理和 OpenCV 的新手 但我的第一次尝试是使用 FlannBasedMatcher 并比较检测到的关键点的数量 有一个更好的方法吗 填写表格 jpg 表单模板 jpg im
  • 下载并读取 R 中的 shapefile 函数

    我想扩展这个功能 截至目前 该函数从网络下载并解压形状文件 我想实现 rgdal 将文件读入 R library rgdal dlshape function location temp tempfile download file loc
  • 在半透明 JFrame 上不使用 setOpaque() 删除 JTextPane 的白色背景

    我有一个 Java 代码 我在其中实现了一个半透明的 JPanel 并在其上使用 Graphics 2D 绘制了图像 该图像是 PNG 图像 其中包含一个 80 不透明的白色矩形 遍布整个 JFrame 现在我需要添加一个 JTextPan
  • const TypedefedIntPointer 不等于 const int *

    我有以下 C 代码 typedef int IntPtr const int cip new int const IntPtr ctip4 cip 我使用 Visual Studio 2008 编译它并收到以下错误 错误 C2440 初始化
  • 如何在更新查询中动态设置表和字段名称?

    我想循环遍历表格列表 对于每个表 我想运行更新查询 伪代码 ArrayOfTablesObjects tablename1 fieldname1 tablename2 fieldname2 foreach tablename in Arra
  • 长轮询 停止其他请求 1 或 2 分钟

    在创建聊天系统期间 我使用长寿命请求来获取消息 并使用 jquery 请求发送消息 如下所示 Send btn click function ajax type POST url Chat aspx Insert data Str txtS
  • Selenium 浏览器自动化中的执行流程

    我不确定硒中的脚本 自动测试 执行 我想这个过程如下 执行开始 Selenese 命令被转换为 HTTP 请求 浏览器驱动程序的HTTP服务器接收HTTP请求 浏览器驱动程序确定实现该功能所需的步骤命令 浏览器驱动程序在浏览器上执行它们 执
  • Grails 3 与并发会话

    我正在尝试从 2 1 1 升级我的项目 至 3 1 1 我在并发会话方面遇到一些问题 例如 我在浏览器 chrome 上使用用户名 AAA 登录 然后其他用户在其他浏览器上使用用户名 AAA 再次登录 然后用户名 AAA 将在浏览器 chr
  • 将字符串拆分为长数据帧格式的值[重复]

    这个问题在这里已经有答案了 我有一个类似于以下示例的数据框df它由一个字符变量组成VAR df lt data frame ID 1 2 VAR c VAL1 r nVAL2 r nVAL8 VAL2 r nVAL5 stringsAsFa
  • cap 部署 + rbenv:捆绑:找不到命令

    我正在关注https gorails com deploy ubuntu 16 04 我正在运行 bundle exec cap 生产部署 并收到以下错误 10 email protected 0 289s 00 21 bundler in