首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >用RVM编译针对不同Ruby版本的用户本机支持

用RVM编译针对不同Ruby版本的用户本机支持
EN

Stack Overflow用户
提问于 2016-03-08 14:19:06
回答 1查看 5K关注 0票数 0

在CentOS 7上进行清洁安装。

在~/.rvm中安装了RVM作为新的用户乘客

所有托管的站点都由Apache用户拥有。

安装有2颗红宝石的RVM:

  • 1.9.3-p551 (默认)
  • 2.3.0

我在默认的Ruby1.9.3中将用户安装并编译为gem。

但是,在使用Ruby2.3.0的站点上,我一直在我的/var/log/httpd/error_log中获得这些条目:

代码语言:javascript
复制
App 12909 stdout:
App 12909 stderr:  [passenger_native_support.so] trying to compile for the current user (apache) and Ruby interpreter...
App 12909 stderr:      (set PASSENGER_COMPILE_NATIVE_SUPPORT_BINARY=0 to disable)
App 12909 stderr:      Warning: compilation didn't succeed. To learn why, read this file:
App 12909 stderr:      /tmp/passenger_native_support-bqcp0n.log
App 12909 stderr:  [passenger_native_support.so] finding downloads for the current Ruby interpreter...
App 12909 stderr:
App 12909 stderr:      (set PASSENGER_DOWNLOAD_NATIVE_SUPPORT_BINARY=0 to disable)
App 12909 stderr:      Could not download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/5.0.26/rubyext-ruby-2.3.0-x86_64-linux.tar.gz: The requested URL returned error: 404 Not Found
App 12909 stderr:      Trying next mirror...
App 12909 stderr:      Could not download https://s3.amazonaws.com/phusion-passenger/binaries/passenger/by_release/5.0.26/rubyext-ruby-2.3.0-x86_64-linux.tar.gz: The requested URL returned error: 403 Forbidden
App 12909 stderr:  [passenger_native_support.so] will not be used (can't compile or download)
App 12909 stderr:   --> Passenger will still operate normally.

现在,通常您只需运行passenger-config build-native-support,但这显然只适用于内置客运创业板的Ruby环境(= 1.9.3)。

如何为所有已安装的RVM版本构建本机支持并消除此错误?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-08 16:15:11

使用您希望为之编译的Ruby,简单地运行‘客运-配置构建-本机支持’。

例如:

代码语言:javascript
复制
rvm use 2.3.0
ruby /path-to-passenger-config build-native-support

乘客不在乎你以前安装的是哪个Ruby。您可以在任何Ruby中使用客运,不管您以前安装的是哪个Ruby。rubies.html

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

https://stackoverflow.com/questions/35869809

复制
相关文章

相似问题

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