【发布时间】: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