首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >与乘客切换红宝石版本,得到错误

与乘客切换红宝石版本,得到错误
EN

Server Fault用户
提问于 2015-10-25 15:28:18
回答 1查看 1.1K关注 0票数 3

最近我从2.2.5切换到了2.1.5,并注意到我尝试编译并下载解释器如下:

代码语言:javascript
复制
[ 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。

基本上,我想知道哪些正确的步骤,从使用一个版本的ruby到另一个版本的乘客安装-nginx-模块使用Debian的所有默认值。

EN

回答 1

Server Fault用户

发布于 2015-10-30 08:45:06

如果您计划更改您的红宝石版本,我强烈建议您使用像rvm或(我更喜欢这个) 里本夫这样的工具。

在安装和ruby安装之后,要切换ruby版本,只需调优乘客模块配置中的默认ruby。

代码语言:javascript
复制
/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,您可以为确切的ruby版本设置和ENV变量,或者在项目的根中包含一个.ruby-version文件。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/731514

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档