【问题标题】:unicorn is not part of the bundle. Add it to Gemfile独角兽不是捆绑的一部分。将其添加到 Gemfile
【发布时间】:2023-03-29 22:13:01
【问题描述】:

在尝试使用 capistrano、nginx 和 unicorn 在数字海洋(Ubuntu、Ruby on Rails)上部署时,我收到了这个错误:

DEBUG[fae8c972]     /home/deploy/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/rubygems_integration.rb:252:in `block in replace_gem'
DEBUG[fae8c972]     :
DEBUG[fae8c972]     unicorn is not part of the bundle. Add it to Gemfile.
DEBUG[fae8c972]      (
DEBUG[fae8c972]     Gem::LoadError
DEBUG[fae8c972]     )
DEBUG[fae8c972]         from /home/deploy/.rbenv/versions/2.1.2/bin/unicorn:22:in `<main>'
cap aborted!

unicorn gem 存在于 gemfile 和 gemfile.lock 中

任何帮助将不胜感激。谢谢

更新 - 刚刚发现我的服务器正在选择旧版本的 Gemfile(其中没有列出独角兽)。知道如何解决吗?

【问题讨论】:

  • 独角兽在你的 Gemfile 中注册了吗?
  • 你有没有在你的数字海洋机器上运行bundle install
  • 是的,它存在于 gemfile 和 gemfile.lock 中
  • coderwall.com/p/yz8cha 这似乎是一篇关于 DO、Unicorn 和 Capistrano 的好文章
  • 尝试在我的数字海洋项目的当前文件夹上运行 bundle install,但仍然失败并出现同样的错误。

标签: ruby-on-rails nginx capistrano unicorn digital-ocean


【解决方案1】:

默认情况下从 master 分支进行部署。

将此行添加到 deploy.rb 解决了这个问题: 设置:分支,'开发'

【讨论】:

    猜你喜欢
    • 2016-06-24
    • 2023-03-12
    • 1970-01-01
    • 2015-11-19
    • 1970-01-01
    • 2018-11-10
    • 2018-01-19
    • 1970-01-01
    • 2020-07-08
    相关资源
    最近更新 更多