我遇到了一个服务器错误,它告诉我,它不能检测到耙子等重要的gem。 研究表明,Phusion Passenger和RVM之间存在一个错误的交stream。 RVM build议在服务器的全局configuration文件中设置PassengerDefaultRuby ,在我的情况下是/etc/apache2/apache2.conf 。 当我插入这一行:
PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby
重新启动Apache时出现此错误:
Syntax error on line 39 of /etc/apache2/apache2.conf: Invalid command 'PassengerDefaultRuby', perhaps misspelled or defined by a module not included in the server configuration
也许我把这个代码放在错误的文件中? 或者也许别的东西出了问题? 任何指导将不胜感激。
你需要检查你是否加载了mod_passenger模块:
# apachectl -M | grep passenger
您提到的选项包含在版本4.0 Release Candidate 6中 :
4.0 RC 5和RC 6中的更改
RC 5和RC 6中最重要的变化如下:
Apache的默认configuration片段已经更改! 它现在必须包含一个PassengerDefaultRuby选项。 安装程序已更新以输出此选项。 PassengerRuby选项仍然存在,但它仅用于在不同的上下文中configuration不同的Ruby解释器。 请参阅手册了解更多信息。
根据安装方法的不同,可能会有更早的版本。