【问题标题】:RVM - Ruby update - Unable to autodetect the currently active RVM gem set nameRVM - Ruby 更新 - 无法自动检测当前活动的 RVM gem 集名称
【发布时间】: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


    【解决方案1】:

    看起来将乘客更新到新版本确实有帮助(已更新到 6.0.2)。

    【讨论】:

    • 非常感谢!有趣的是,在旧服务器上它只是显示错误消息,但无论如何都启动了Passenger。它是新服务器上的同一个应用程序,具有相同的 Ruby/Rails 版本,以及所有 gem 的相同版本,唯一的区别是新服务器有 Ubuntu 18.04,旧有 12.04。奇怪的。我使用 Rails 4.2.2 将 Gemfile 更改为 passenger '~> 6.0.4'。适用于新旧服务器。
    猜你喜欢
    • 1970-01-01
    • 2013-05-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-26
    • 1970-01-01
    • 1970-01-01
    • 2013-12-27
    相关资源
    最近更新 更多