passenger_free_ruby如何运作?
我使用phusion提供的apt包安装了phusion乘客.我的系统ruby是使用brightbox apt软件包安装的ruby2.1.我希望/etc/apache2/mods-enabled/passenger.conf使用/ usr/bin/ruby作为PassengerDefaultRuby的默认值.它使用/ usr/bin/passenger_free_ruby.
passenger_free_ruby就像红宝石一样,是预期的红宝石
/usr/bin/passenger_free_ruby -v
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux-gnu]
Run Code Online (Sandbox Code Playgroud)
如果我将ruby升级到ruby2.2,那么passenger_free_ruby就像ruby2.2一样运行
/usr/bin/passenger_free_ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux-gnu]
Run Code Online (Sandbox Code Playgroud)
那么passenger_free_ruby实际上做了什么?自由是什么意思?为什么不使用/ usr/bin/ruby作为默认的ruby?
其存在的原因记录在可执行文件的源代码中.
/*
* This is a simple program for executing either the 'ruby' command in PATH,
* or one of the Ruby versions installable by APT. This is necessary because
* Debian 6 and Debian 8 (among others) do not install /usr/bin/ruby upon
* installing one of the versioned Ruby packages (e.g. apt-get install ruby2.1).
* Commands such as 'passenger' are supposed to be runnable under any Ruby
* interpreter the user desires, including non-APT-installed Rubies, but we can't
* just set the shebang line to '#!/usr/bin/env ruby'. This problem is solved by
* setting the shebang line to '#!/usr/bin/passenger_default_ruby'.
*/
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1529 次 |
| 最近记录: |