ubuntu – apt passenger包安装的passenger_free_ruby可执行文件是什么

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就像ruby一样,是预期的ruby

/usr/bin/passenger_free_ruby -v
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux-gnu]

如果我将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]

那么passenger_free_ruby实际上做了什么?自由是什么意思?为什么不使用/usr/bin/ruby​​作为认的ruby?

解决方法

其存在的原因记录于 the executable’s source code.

/*
 * 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'.
 */

相关文章

ubuntu退出redis的示例:指定配置文件方式启动源码redis:roo...
ubuntu中mysql改密码忘了的解决方法:1.在终端中切换到root权...
ubuntu安装mysql失败的解决方法原因:可能是原有的MySQL还有...
使用centos和ubuntu建站的区别有以下几点1.CentOS是Linux发行...
ubuntu图形界面和字符界面切换的方法:可以通过快捷键CTRL+A...
ubuntu中重启mysql失败的解决方法1.首先,在ubuntu命令行中,...