【发布时间】:2019-07-17 10:34:14
【问题描述】:
我正在尝试更新我的一台服务器上的 ruby 版本。我已经更新了 RVM 并安装了新的 Ruby,但我遇到了乘客问题(独立)。
据我所知,它之前是作为 Gemfile 的 gem 安装的(Ruby 2.2.5)。
bundle exec gem list passenger
*** LOCAL GEMS ***
passenger (5.0.30)
它仍然作为 Gemfile 中的 gem 安装(在 Ruby 2.6.3 中):
bundle exec gem list passenger
*** LOCAL GEMS ***
passenger (5.0.30)
我的 rvm 中的 Ruby 设置为默认 rvm --default use 2.6.3
我没有使用任何 gemset 名称(有一个默认的 @global)。
当我尝试使用此配置部署应用程序时,当 capistrano 试图阻止乘客时遇到错误:
00:34 deploy:restart
01 ~/.rvm/bin/rvm 2.6.3@global do bundle exec passenger stop
01 Unable to autodetect the currently active RVM gem set name. This could happen if you ran this program using 'sudo' instead of 'rvmsudo'. When using RVM, you're always supposed to use 'rvmsudo' instead of 'sudo!'.
01
01 Please try rerunning this program using 'rvmsudo'. If that doesn't help, please contact this program's author for support.
但正如你所见,我没有使用任何 sudo 或 rvmsudo...
当我进入服务器并尝试手动重启乘客时,我得到了同样的错误:
bundle exec passenger stop --help --verbose
Unable to autodetect the currently active RVM gem set name. This could happen if you ran this program using 'sudo' instead of 'rvmsudo'. When using RVM, you're always supposed to use 'rvmsudo' instead of 'sudo!'.
Please try rerunning this program using 'rvmsudo'. If that doesn't help, please contact this program's author for support.
知道如何“让它发挥作用”吗?
【问题讨论】:
标签: ruby-on-rails ruby rvm passenger