简体   繁体   English

生产中rbenv的乘客设置

[英]passenger setup for rbenv in production

I have some questions. 我有一些疑问。

  1. Is it possible (or appropriate) to use rbenv in production? 是否有可能(或适当地)在生产中使用rbenv
  2. Should I install rbenv as root, or normal user? 我应该以root用户还是普通用户身份安装rbenv
  3. How passenger can know which ruby version it should use for a application? 乘客如何知道应在应用程序中使用哪种红宝石版本? Can passenger recognize .ruby-version file? 乘客可以识别.ruby-version文件吗?

I would not recommend to use rbenv in production, cause it have sense only if you required to have several ruby versions in the same time. 我不建议在生产中使用rbenv ,因为只有当您需要同时具有多个ruby版本时才有意义。

I would recommend to use system ruby from you OS repository. 我建议您使用OS存储库中的系统ruby。

EDIT: According your questions 编辑:根据您的问题

  1. It is quite possible to use rbenv in production (as well as rvm ). 在生产中(以及rvm )很有可能使用rbenv But I would recommend to use ruby from your OS repositories. 但是我建议您从操作系统存储库中使用ruby。
  2. You may install either as user or root. 您可以以用户或root身份安装。
  3. You should use .ruby-version to point to the right version. 您应该使用.ruby-version指向正确的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM