我最近从2.2.5切换到2.1.5,注意到我试图编译和下载这样的解释器:
[ 2015-10-25 11:15:15.3328 8841/b6ad5b40 age/Cor/CoreMain.cpp:793 ]: Disconnecting long-running connections for process 16579, application /var/apps/app/public (production) App 17117 stdout: App 17117 stderr: --> Compiling passenger_native_support.so for the current Ruby interpreter... App 17117 stderr: App 17117 stderr: (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable) App 17117 stderr: App 17117 stderr: --> Downloading precompiled passenger_native_support.so for the current Ruby interpreter... App 17117 stderr: App 17117 stderr: (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable) App 17117 stderr: App 17117 stderr: Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.20/rubyext-ruby-2.1.5-x86-linux.tar.gz: The requested URL returned error: 404 Not Found App 17117 stderr: Trying next mirror... App 17117 stderr: Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/5.0.20/rubyext-ruby-2.1.5-x86-linux.tar.gz: The requested URL returned error: 403 Forbidden App 17117 stderr: --> Continuing without passenger_native_support.so. App 17140 stdout:
这似乎没有任何问题(正常产卵),但我想知道什么是正确的方式来重新编译这个没有开始新鲜,所以我可以解决这个问题? 任何帮助将非常感激! 运行nginx +乘客w / rbenv。
基本上我想知道在使用passenger-install-nginx-module安装Debian上的所有默认设置之后,从一个版本的ruby转换到另一个版本的正确步骤。
如果你打算改变你的ruby版本,我强烈推荐使用rvm或(我更喜欢这个) rbenv
在安装和ruby安装之后,要切换ruby版本,只需要调整乘客模块configuration中的默认ruby。
/etc/apache2 $ cat mods-enabled/passenger.conf ### Begin automatically installed Phusion Passenger config snippet ### <IfModule mod_passenger.c> PassengerRoot /usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini # PassengerDefaultRuby /usr/bin/passenger_free_ruby PassengerDefaultRuby /home/me/.rbenv/shims/ruby </IfModule> ### End automatically installed Phusion Passenger config snippet ###
如果你使用rbenv ,你可以为你的项目的根目录设置和ENVvariables,或者在你的项目的根目录下包含一个.ruby-version文件。