簡體   English   中英

使用RVM為不同的Ruby版本編譯Passenger Native Support

[英]Compile Passenger Native Support with RVM for different Ruby versions

在CentOS 7上進行全新安裝。

將RVM作為新用戶Passenger安裝在〜/ .rvm中

托管的所有站點均由Apache用戶擁有

已安裝2個紅寶石的RVM:

  • 1.9.3-p551(默認)
  • 2.3.0

我在默認的Ruby 1.9.3中將Passenger安裝和編譯為gem。

但是,我在使用Ruby 2.3.0的網站上的/var/log/httpd/error_log不斷獲得這些條目:

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但這顯然僅適用於內置Passenger寶石(= 1.9.3)的Ruby環境。

如何建立對所有RVM安裝版本的本機支持,並使該錯誤消失?

使用您要編譯的Ruby來簡單地運行“ passenger-config build-native-support”。

例如:

rvm use 2.3.0
ruby /path-to-passenger-config build-native-support

乘客不關心您用來安裝乘客的Ruby。 您可以將Passenger與任何Ruby一起使用,無論您用於安裝Passenger的是哪種Ruby。 https://www.phusionpassenger.com/library/indepth/ruby/multiple_rubies.html

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM