Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 乘客:无法自动检测当前激活的RVM gem集合名称_Ruby On Rails_Passenger - Fatal编程技术网

Ruby on rails 乘客:无法自动检测当前激活的RVM gem集合名称

Ruby on rails 乘客:无法自动检测当前激活的RVM gem集合名称,ruby-on-rails,passenger,Ruby On Rails,Passenger,正在尝试运行passenger-install-apache2-module,该模块退出时显示错误消息: 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' inst

正在尝试运行passenger-install-apache2-module,该模块退出时显示错误消息:

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.

我不是通过sudo命令运行它。RVM全局安装在/usr/local/RVM/bin/RVM中。我在RHEL 6上。

您是否尝试运行上述rvmsudo


首先,我要检查您的RVM安装是否有效且功能正常。

使用RVM激活Ruby环境就成功了。

在与此搏斗了一段时间后,我从RVM切换到了rbenv,这完全解决了问题。我的理论是我的系统ruby@2.4.1被passenger调用,而不是我想使用的ruby@2.4.4,rbenv没有这个问题。

一定是rvm use-default 2.3.2